Test name | Executions per second |
---|---|
find | 3030.4 Ops/sec |
some | 1873.1 Ops/sec |
var all = []
for(let j = 0; j < 10; j++){
var data = []
for (let i = 0; i < 5000; ++i) data.push({ username: 'toto' })
data.push({ username: 'titi' })
for (let i = 0; i < 2500; ++i) data.push({ username: 'toto' })
all.push(data)
}
all.forEach(d => d.find(e => e.username === 'titi'))
all.forEach(d => d.some(e => e.username === 'titi'))