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, n = null,
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 | |
---|---|---|
n eqeqeq null |
| ready |
n eqeq null |
| ready |
isU |
| ready |
isN |
| ready |
isUN |
| ready |
isUNfn |
| ready |
isUNb |
| ready |
n |
| ready |
not n |
| ready |
not not n |
| ready |
not not not n |
| ready |
u eqeqeq null |
| ready |
u eqeq null |
| ready |
u isU |
| ready |
u isN |
| ready |
u isUN |
| ready |
u isUNfn |
| ready |
u 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.