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="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.6.9/core.min.js" integrity="sha256-+TULExmyD/NYybiq1jR6qIxiCQHqmjb3yGVZyKyIgso=" crossorigin="anonymous"></script>
var array = [];
var object = {};
var map = new Map();
for (var i = 0; i < 1000000; i++) {
var element = {
key: ''+i,
value: ''+Math.random()
};
array.push(element);
object[element.key] = element;
map.set(element.key, element);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Array, find |
| ready |
Array, filter |
| ready |
Array, for loop |
| ready |
Object |
| ready |
Map |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.