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>
hash = {}
hash2 = {}
for (var r = 0; r < 4; r++)
for (var g = 0; g < 4; g++)
for (var b = 0; b < 4; b++)
for (var a = 0; a < 4; a++) {
hash[[r, g, b, a].join(",")] = 1;
hash2[(a | (b << 8) | (g << 16) | (r << 24)).toString()] = 1
}
var r = Math.floor(Math.random() * 4)
var g = Math.floor(Math.random() * 4)
var b = Math.floor(Math.random() * 4)
var a = Math.floor(Math.random() * 4)
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
join |
| ready |
string join |
| ready |
bit maths |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.