HTML Preparation code:
AخA
 
1
<script src="lodash.js"></script>
Script Preparation code:
 
const peopleArray = []
for(i=0;i<100000;i++){
  peopleArray.push({name: 'Gosia', surname: 'Mazurek'})
}
peopleArray.push({name: 'Adam', surname:'Horodyski'})
var array = [...peopleArray];
Tests:
  • Array.prototype.find

     
    array.find(n => n.name === 'Adam' && n.surename === 'Horodyski')
  • Lodash find

     
    _.find(array,n => n === 99999)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.find
    Lodash find

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67
Chrome 114 on Windows
View result in a separate tab
Test name Executions per second
Array.prototype.find 3065.1 Ops/sec
Lodash find 2371.9 Ops/sec