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 o = {
i: 42,
s: 3,
n: 5,
r: 7,
a: [1, 2, 3],
f: function(i) {
return i;
}
};
var f = {
i: 42,
s: 3,
n: 5,
r: 7,
a: [1, 2, 3],
f: function(i) {
return i;
}
};
var s = {
i: 42,
s: 3,
n: 5,
r: 7,
a: [1, 2, 3],
f: function(i) {
return i;
}
};
Object.seal(s);
Object.freeze(f);
function deepFreeze(o) {
Object.freeze(o); // First freeze the object.
for (var propKey in o) {
var prop = o[propKey];
if (o.hasOwnProperty(propKey) && prop instanceof Object && !Object.isFrozen(prop)) {
deepFreeze(prop); // Recursively call deepFreeze.
}
}
}
var df = {
i: 42,
s: 3,
n: 5,
r: 7,
a: [1, 2, 3],
f: function(i) {
return i;
}
};
deepFreeze(df);
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
seal |
| ready |
normal |
| ready |
freeze |
| ready |
deeply frozen |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.