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 js type
var _toString = {}.toString; // cache it god damn it!!
var theValue = {}; // also, a literal object _in the test_ may or may NOT render the same code - a literal benchmark is kinda fucking retarded - would NEVER be used in real code.
Ready to run.
Test | Ops/sec | |
---|---|---|
typeof |
| ready |
typeof 2 |
| ready |
constructor |
| ready |
Object.prototype.toString.call theValue (cached) |
| ready |
theValue.toString() |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.