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>
function arrayCopy( arr ) {
var ret = new Array(arr.length);
for( var i = 0, len = arr.length; i < len; ++i ) {
ret[i] = arr[i];
}
return ret;
}
</script>
var arr = [], res = [];
for (var i=0; i<500; i++) {
arr.push(1, 2, 3, 4);
}
var res = [];
Ready to run.
Test | Ops/sec | |
---|---|---|
Concat |
| ready |
Slice |
| ready |
while [ ] |
| ready |
while push |
| ready |
arrayCopy |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.