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
Compares speedr.js iterators to normal object iteration.
All functions are designed so that they end up with two local variables, k and v, which correspond to key, value pairs.
<script src="https://raw.github.com/genericdave/speedr.js/master/speedr.js">
</script>
var obj = {};
var map = new speedr.Map();
for (i = 0; i <= 1000; i++) {
iS = i.toString();
obj[iS] = iS;
map.set([iS, iS]);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Normal object for loop |
| ready |
speedr.js each |
| ready |
speedr.js iter |
| ready |
keys |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.