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 result1, result4;
var result2, result5;
var result3, result6;
var markingTitleId = 18;
var aryIntLo = [131071];
var aryIntAt = [131072];
var aryIntHi = [131073];
var originalFunc = function(s, a) {
return (Math.pow(2, ((s - 1) % 30))) & a[Math.floor((s - 1) / 30)];
};
var noModFunc = function(s, a) {
return (1 << (s - 1)) & a[Math.floor((s - 1) / 30)];
};
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Mod |
| ready |
Shift |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.