jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
test performance for extending objects using lodash.merge, lodash.defaults, and vanilla javascript
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.2.1/lodash.js"></script>
defaults = {
url: 'https://example.com/api',
service: 'info',
method: 'GET'
};
options = {
id: 12345,
service: 'device-management',
stype: 'devices'
};
extend = function (target, source) {
for (var key in source) {
target[key] = source[key];
}
return target;
};
Ready to run.
Test | Ops/sec | |
---|---|---|
lodash merge |
| ready |
lodash defaults |
| ready |
vanilla javascript extend |
| ready |
lodash assign |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.