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
Here we compare iterating through a list and performing multiple operations in different ways. The goal is to determine how costly (or not) it is to iterate multiple times vs performing concurrent operations in a single iteration cycle.
We are interested in this for game engine system performance comparison.
var li = new Array(10000)
var each
for (var i = 0; i < li.length; ++i) {
li[i] = {id: i, name: "somename", age: 1}
}
function capitalizeName (obj) {
obj.name = obj.name.toUpperCase()
}
function increaseAge (obj) {
obj.age++
}
Ready to run.
Test | Ops/sec | |
---|---|---|
for batched inline |
| ready |
for batched functions |
| ready |
for unbatched inline |
| ready |
for unbatched functions |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.