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
const headers = [
['Set-Cookie', 'key=value'],
['Set-Cookie', 'key2=value2'],
['Set-Cookie', 'key3=value3'],
['Set-Cookie', 'key4=value4'],
['Set-Cookie', 'key=value'],
['Set-Cookie', 'key2=value2'],
['Set-Cookie', 'key3=value3'],
['Set-Cookie', 'key4=value4'],
]
const headersObj = new Headers(headers)
const counters = {
destructuring: 0,
direct: 0
}
function incDest(value) {
counters.destructuring += value
}
function incDir(value) {
counters.direct += value
}
console.log(counters.destructuring, counters.direct)
counters.destructuring = 0
counters.direct = 0
Ready to run.
Test | Ops/sec | |
---|---|---|
Destructuring Array |
| ready |
Direct access Array |
| ready |
Destructuring Headers |
| ready |
Direct access Headers |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.