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 src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.1/crossfilter.min.js"></script>
var array = [];
for (var i=0; i<10000; i++) {
array.push(i);
}
for (var i=0; i<10000; i++) {
if (i%2 === 0) {
array.push(i);
}
}
function shuffle(o){
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
};
var testArray = shuffle(array);
var array = [];
var testArray = [];
var newArray = [];
Ready to run.
Test | Ops/sec | |
---|---|---|
underscore only |
| ready |
regular js sort |
| ready |
crossfilter sort |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.