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>
var array = [];
var obj = {}
for (var i = 0; i < 10000; i++) {
array[i] = i;
obj[i] = i;
}
function foo(x) {
return x * 2;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
bind |
| ready |
thisArg |
| ready |
regular function |
| ready |
closure |
| ready |
for loop (non-optimized) |
| ready |
for loop |
| ready |
for loop, no fn call |
| ready |
nop for loop |
| ready |
with has own check |
| ready |
has own check (obj) |
| ready |
forEach on obj |
| ready |
has own check (obj) with fn |
| ready |
has own check (obj) with fn no hasOwn |
| ready |
using object.keys |
| ready |
closure w/fn call |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.