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
Checks if objects that were Object.freeze()ed are faster when accessing properties
const obj_unfrozen = {};
const obj_frozen = {};
for(let i = 'a'.charCodeAt(); i <= 'z'.charCodeAt(); i ++){
for(let j = 'A'.charCodeAt(); j <= 'Z'.charCodeAt(); j ++){
const k = String.fromCharCode(i, j);
obj_unfrozen[k] = obj_frozen[k] = i * j;
}
}
Object.freeze(obj_frozen);
Ready to run.
Test | Ops/sec | |
---|---|---|
Normal object |
| ready |
Frozen object |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.