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
Check performance of === vs == in varying situations.
<script>
var u, e = '',
isU = function (v) { return typeof v === 'undefined'; },
isN = function (v) { return v === null; },
isUN = function (v) { return typeof v !== 'undefined' && v !== null; },
isUNfn = function (v) { return !isU(v) && !isN(v); },
isUNb = function (v) { return !!!v; };
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
u eqeqeq undefined |
| ready |
u eqeq undefined |
| ready |
typeof u eqeqeq 'undefined' |
| ready |
typeof u eqeq 'undefined' |
| ready |
isU |
| ready |
isN |
| ready |
isUN |
| ready |
isUNfn |
| ready |
isUNb |
| ready |
u |
| ready |
not u |
| ready |
not not u |
| ready |
not not not u |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.