Script Preparation code:
x
 
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)
  }
Tests:
  • find

     
    all.forEach(d => d.find(e => e.username === 'titi'))
  • some

     
    all.forEach(d => d.some(e => e.username === 'titi'))
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    find
    some

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Chrome 86 on Mac OS X 10.14.3
View result in a separate tab
Test name Executions per second
find 3030.4 Ops/sec
some 1873.1 Ops/sec