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
Integer division using various methods.
const floor = (num, den) => {
return Math.floor(num / den);
};
const tilde = (num, den) => {
return ~~(num / den);
};
const gtgtz = (num, den) => {
return (num / den) >> 0;
};
const pipez = (num, den) => {
return (num / den|0);
};
const remin = (num, den) => {
return (num - (num % den))/ den;
};Ready to run.
| Test | Ops/sec | |
|---|---|---|
| Math.floor | | ready |
| Double Tilde | | ready |
| Bitshift | | ready |
| Pipe Zero | | ready |
| Remainder Subtraction | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.