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
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script src="//jspm.io/system@0.6.js"></script>
<script>
document.getElementById('run').display = 'none';
System.import('github:codemix/fast.js@0.0.4').then(function(fast) {
window.fast = fast;
document.getElementById('run').display = '';
});
</script>
var acc = 0;
var array = _.range(1000);
var add = function(a, b, c) { return a + b + c; };
var iterator = function(x) { acc += x; };
var mapper = function(x) { return x * x; };
var reducer = function(acc, x) { return acc + x; };
var fastBound = fast.bind(add, this),
lodashBound = _.bind(add, this),
nativeBound = add.bind(this);
var fastPartial = fast.partial(add, 1, 2),
lodashPartial = _.partial(add, 1, 2);
Ready to run.
Test | Ops/sec | |
---|---|---|
indexOf - fast |
| ready |
indexOf - lodash |
| ready |
indexOf - native |
| ready |
lastIndexOf - fast |
| ready |
lastIndexOf - lodash |
| ready |
lastIndexOf - native |
| ready |
forEach - fast |
| ready |
forEach - lodash |
| ready |
forEach - native |
| ready |
bind - fast |
| ready |
bind - lodash |
| ready |
bind - native |
| ready |
partial - fast |
| ready |
partial - lodash |
| ready |
map - fast |
| ready |
map - lodash |
| ready |
map - native |
| ready |
reduce - fast |
| ready |
reduce - lodash |
| ready |
reduce - native |
| ready |
concat - fast |
| ready |
concat - native |
| ready |
indexOf - wrapped - fast |
| ready |
indexOf - unwrapped - fast |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.