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>
var itIs = 5,
itsNot = 'foo',
itsNaN = +'foo';
function test1(val) {
return typeof val === 'number' && !isNaN(val);
}
function test2(val) {
return val + 0 === val;
}
function test3(val) {
return Object.prototype.toString.call(val) === '[object Number]' && !isNaN(val);
}
function test4(val) {
return val.constructor === Number && !isNaN(val);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
1 |
| ready |
2 |
| ready |
3 |
| ready |
4 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.