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="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
var data = [], d = 0;
while (d++ < 100) { data.push(d); }
function test(rows) {
var squares = [];
for (var i = 0; i < 100; i++) {
squares.push(Math.exp(rows[i], 2));
}
return squares;
}
var code = 'return [\n';
for (var n = 0; n < data.length; n++) {
code += 'Math.exp(rows[' + n + '], 2),';
}
code = code.substring(0, code.length - 1) + '];\n';
var evalTest = new Function('rows', code);
Ready to run.
Test | Ops/sec | |
---|---|---|
Named Function |
| ready |
Eval |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.