Script Preparation code:
AخA
 
var test = [[1],2,3,4];
var test2 = [-1, 2, 3, 4];
var test3 = ['a', 2, 3, 4];
var c;
Tests:
  • Instanceof

     
    if (test[0] instanceof Array) { c++; }
  • isArray

     
    if (Array.isArray(test[0])) { c++; }
  • isEqual

     
    if (test3[0] === 'a') { 
      c++;
    }
  • isLessThan

     
    if(test2[0] < 0) { 
      c++;
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Instanceof
    isArray
    isEqual
    isLessThan

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
Chrome 83 on Mac OS X 10.15.5
View result in a separate tab
Test name Executions per second
Instanceof 1700500.9 Ops/sec
isArray 1762588.8 Ops/sec
isEqual 2823379.5 Ops/sec
isLessThan 2355408.8 Ops/sec