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
var wc = [0,4,10,0,7,3,4,7,10];
var hc = [5,4,2,10,0,3,1,2,6];
var test = [];
for(let i = 0; i < 10000; i++)
{
var generated = [];
for(let j = 0; j < 9; j++){
generated.push(Math.random()*9|0);
}
}
function stableSort(arr, compare)
{
const indices = new Map();
arr.forEach( (v,i) => indices.set(v,i));
return arr
.sort((a, b) => compare(a, b) || indices.get(a) - indices.get(b));
}
Ready to run.
Test | Ops/sec | |
---|---|---|
native |
| ready |
stable |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.