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: an hour ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Windows
View result in a separate tab
Test name Executions per second
typeof 4516910.0 Ops/sec
isArray 4514873.0 Ops/sec
instanceof 4432167.5 Ops/sec