Script Preparation code:
AخA
 
var test = [1,2,3,4];
var c;
Tests:
  • typeof

     
    if (typeof test === 'object') { c++; }
  • isArray

     
    if (Array.isArray(test)) { c++; }
  • instanceof

     
    if (test instanceof Array) { c++; }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    typeof
    isArray
    instanceof

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
typeof 13251956.0 Ops/sec
isArray 12989316.0 Ops/sec
instanceof 13220936.0 Ops/sec