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 indexOf = function(elem, array) {
for (var i = 0, length = array.length; i < length; i++) {
if (array[i] === elem) {
return i;
}
}
return -1;
};
var indexOf2 = function(elem, array) {
for (var i = 0; i < array.length; i++) {
if (array[i] === elem) {
return i;
}
}
return -1;
};
var array = [424, 6, 6, "23", 2, 1, 5, 32, 42];
var array2 = [1331, 6464, 2332, 6, 62332, 66, 2, 222];
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
cached, true |
| ready |
nocache, true |
| ready |
cache, negative 1 |
| ready |
no cache, negative 1 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.