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
Reduced elements due to stack overflow in some devices
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
var i,
value,
length,
values = [],
sum = 0,
context = values;
for (i = 0; i < 2000; i++) {
values[i] = Math.random();
}
function add(val) {
sum += val;
}
i = 0;
value = 0;
length = 0;
values = [];
sum = 0;
Ready to run.
Test | Ops/sec | |
---|---|---|
01. forEach |
| ready |
02. for loop, simple |
| ready |
03. for loop, cached length |
| ready |
04. for loop, reverse |
| ready |
05. for loop, cached length, callback |
| ready |
06. for loop, cached length, callback.call |
| ready |
07. $.each |
| ready |
08. for ... in |
| ready |
09. for loop, reverse, decrement condition |
| ready |
10. for loop, reverse, pre-decrement |
| ready |
11. for loop, assignment condition |
| ready |
12. for loop, assignment condition, reversed |
| ready |
13. for loop, assignment condition, callback |
| ready |
14. for loop, assignment condition, callback.call |
| ready |
15. length cached as local var |
| ready |
16. recursion loop |
| ready |
16. reverse recursion |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.