HTML Preparation code:
AخA
 
1
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.min.js'></script>
Script Preparation code:
 
var listA = _.range(10000)
var listB = _.range(9000)
Tests:
  • test 1

     
    const r1 = _.difference(listA, listB)
  • test 2

     
    const r2 = _.filter(listA, x => !_.includes(listB, x))
  • test 3

     
    const r3 = listA.filter(x => !_.includes(listB, x))
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    test 1
    test 2
    test 3

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
test 1 4204.1 Ops/sec
test 2 19.9 Ops/sec
test 3 19.9 Ops/sec