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>
for (var i = 0; i < 10000; i++) {
var a = 123456432469;
arr = a.toString();
arr2 = [];
leng = arr.length + (parseInt((arr.length - 1) / 3));
for (var j = 0, len = arr.length; j < len; j++) {
if ((j % 3 == 0) & (j != 0) & (j != len)) {
arr2[leng] = ".";
leng--;
}
arr2[leng] = arr.slice((0 - j - 1), (len - j));
leng--;
}
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
gg |
| ready |
g |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.