Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
Chrome 93
Mac OS X 10.15.7
Desktop
3 years ago
Test name Executions per second
_.isEqual 2190254.5 Ops/sec
_.difference 1234402.6 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>
Script Preparation code:
x
 
window.foo1 = [1,2,3,4,5,6,7,8,9,10,11,12];
window.bar1 = [33,10,11,12,1,2,3,4,5,6,7,8,9,44];
Tests:
  • _.isEqual

     
    _.isEqual(window.foo1, window.bar1)
  • _.difference

     
    _.difference(window.foo1, window.bar1)