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 undef, undef2, count = 0,
testObj = {};
function isUndefined1(x) {
return x === undefined;
}
function isUndefined2(x) {
return typeof undef === 'undefined';
}
function isUndefined3(x) {
return typeof x == 'undefined';
}
function isUndefined4(x) {
return x === undef2;
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
strict eq undefined |
| ready |
typeof strict eq undefined |
| ready |
typeof eq undefined |
| ready |
strict eq undef var |
| ready |
isUndefined1 |
| ready |
isUndefined2 |
| ready |
isUndefined3 |
| ready |
isUndefined4 |
| ready |
Strict prop test |
| ready |
prop in obj test |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.