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
function testJoin(...names) {
const list = []
for (const item of names) {
list.push(item)
}
return list.join(' ')
}
function testAdd(...names) {
const [name, ...otherNames] = names
var list = name
for (const item of otherNames) {
list += ' '+ item
}
return list
}
const concat = String.prototype.concat.bind(String.prototype)
function testConcat(...names) {
const [name, ...otherNames] = names
var list = name
for (const item of otherNames) {
list = concat(list, ' '+ item)
}
return list
}
const data = {
data1() {
return [
`Component1-${Date.now()} std-flex std-flex-column std-flex-align-center std-overflow-hidden`,
`Component2-${Date.now()}`,
]
},
data2() {
return [
`Component1-${Date.now()} std-flex std-flex-column std-flex-align-center std-overflow-hidden`,
`Component2-${Date.now()} std-flex std-flex-column std-flex-align-center std-overflow-hidden`,
]
},
data3() {
return [
`Component1-${Date.now()} std-flex std-flex-column std-flex-align-center std-overflow-hidden`,
`Component2-${Date.now()} std-flex std-flex-column std-flex-align-center std-overflow-hidden`,
`Component3-${Date.now()} std-flex std-flex-column std-flex-align-center std-overflow-hidden`,
`Component4-${Date.now()} std-flex std-flex-column std-flex-align-center std-overflow-hidden`,
]
},
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Join |
| ready |
Add |
| ready |
Concat |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.