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
Using ~~ and | 0, etc. it isn't particularly apparent what the developer's intentions are.
<script>
var n = Math.random() * 1000;
var CONVERT_TO_INTEGER = 0;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
bitwise NOT |
| ready |
bitwise OR |
| ready |
Math.floor |
| ready |
Math.ceil |
| ready |
Math.round |
| ready |
parseInt |
| ready |
Bitwise OR w/ variable for readability |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.