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>
var arr = [];
var fill = function() {
var i, len;
for (i = 0, len = 100; i < len; i += 1) {
arr.unshift({
num: i
});
}
};
fill();
var arr2 = [];
var fill2 = function() {
var i, len;
for (i = 0, len = 100; i < len; i += 1) {
arr2.unshift({
num: "" + i
});
}
};
fill2();
replaceString = function() {
return this.num;
};
var sortFn = function(a, b) {
return a.num - b.num
};
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
one |
| ready |
two |
| ready |
three |
| ready |
four |
| ready |
five |
| ready |
six |
| ready |
seven |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.