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
dummy = {}
function setDummy (key, val) {
dummy[key] = val
}
function readDummy (key) {
return dummy[key]
}
function setLS (key, val) {
localStorage.setItem(key, val)
}
function readLS (key) {
return localStorage.getItem(key)
}
function makeSetKeys (count) {
var s = []
for (var i = 0; i < count; i++) {
s.push("testKey" + i)
}
return s
}
function makeSetVals (count) {
var s = []
for (var i = 0; i < count; i++) {
s.push("testValue" + i)
}
return s
}
kset1 = makeSetKeys(20)
kset2 = makeSetKeys(200)
vset1 = makeSetVals(20)
vset2 = makeSetVals(200)
for (var i = 0; i < kset2.length; i++) {
setLS(kset2[i], vset2[i])
}
dummy = {}
function clearLocalStorage (s) {
for (var i = 0; i < s.length; i++) {
localStorage.removeItem(s[i])
}
}
clearLocalStorage(kset2)
Ready to run.
Test | Ops/sec | |
---|---|---|
dummy-get-1 |
| ready |
ls-get-1 |
| ready |
dummy-get-2 |
| ready |
ls-get-2 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.