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
Tests the difference in performance between the obscure ({"function":1}[typeof somefunc])
way of testing if something is a function vs the straightforward (typeof somefunc=="function")
. Using the version with quotes to work around a bug in IE.
This is the test for when the result is false.
function somefunc() {}
var functionTester = {"function":1};
Ready to run.
Test | Ops/sec | |
---|---|---|
Obscure inline |
| ready |
Obscure cached |
| ready |
Straightforward |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.