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
const f = o => Object.getOwnPropertyNames(o);
const t1 = obj => !f(obj) || obj;
const t2 = obj => [f(obj), obj][1];
const t3 = obj => (void f(obj)) ?? obj;
const t4 = obj => (NaN == f(obj)) || obj;
const t5 = obj => (NaN === f(obj)) || obj;
Ready to run.
Test | Ops/sec | |
---|---|---|
obj => !f(obj) || obj |
| ready |
obj => [f(obj), obj][1] |
| ready |
(void f(obj)) ?? obj |
| ready |
(NaN == f(obj)) || obj |
| ready |
(NaN === f(obj)) || obj |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.