Script Preparation code:
Tests:

Historical Performance Data aggregated from 11 community runs

Desktop Results:
Chrome 11 runs
variable.constructor name
4.5M/s
variable.constructor
3.3M/s
isArray
3.3M/s
Instanceof
3.3M/s

Fastest: variable.constructor name (1.4x faster)

View exact numbers
  • variable.constructor name: 4,540,626 ops/sec
  • variable.constructor: 3,311,821 ops/sec
  • isArray: 3,276,597 ops/sec
  • Instanceof: 3,274,674 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Instanceof
    isArray
    variable.constructor
    variable.constructor name

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137 on Windows
View result in a separate tab
isArray
13.0M/s
Instanceof
13.0M/s
variable.constructor
10.7M/s
variable.constructor name
8.7M/s
View exact numbers
Test name Executions per second
isArray 13,032,839 Ops/sec
Instanceof 13,005,349 Ops/sec
variable.constructor 10,738,645 Ops/sec
variable.constructor name 8,741,260 Ops/sec