HTML Preparation code:
x
 
1
2
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Tests:
  • omit

     
    const foo = ['field1', 'field2', 'field3', 'field4', 'field5'];
    _.reject(foo, nextField => nextField === 'field4');
  • filter

     
    const foo = ['field1', 'field2', 'field3', 'field4', 'field5'];
    _.filter(foo, nextField => nextField !== 'field4');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    omit
    filter

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
omit 4880638.5 Ops/sec
filter 5173299.0 Ops/sec