HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
Script Preparation code:
x
 
function getRandomInt(max) {
  return Math.floor(Math.random() * max);
}
var arr2 = [];
var arr1 = [];
for(var index1123123; index1123123 <= 1000000; index1123123++ ){
    const i = getRandomInt(1000);
    const o = getRandomInt(1000);
    arr1.push(i);
    arr2.push(o);
}
Tests:
  • Lodash.js isEqual

     
    _.isEqual(arr1, arr2);
  • lodash.js difference

     
    const mytest = _.difference(arr1, arr2);
    (mytest.length == 0)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Lodash.js isEqual
    lodash.js difference

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53
Chrome 101 on Windows
View result in a separate tab
Test name Executions per second
Lodash.js isEqual 1776662.8 Ops/sec
lodash.js difference 1860018.6 Ops/sec