Script Preparation code:
Tests:

Historical Performance Data aggregated from 25 community runs

Desktop Results:
Chrome 20 runs
typeof check
637K/s
instanceof check
403K/s
constructor check
79K/s

Fastest: typeof check (8.1x faster)

View exact numbers
  • typeof check: 637,304 ops/sec
  • instanceof check: 403,398 ops/sec
  • constructor check: 78,844 ops/sec
Firefox 5 runs
constructor check
1.1M/s
typeof check
1.0M/s
instanceof check
112K/s

Fastest: constructor check (9.9x faster)

View exact numbers
  • constructor check: 1,108,089 ops/sec
  • typeof check: 1,043,740 ops/sec
  • instanceof check: 112,270 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
    typeof check
    instanceof check
    constructor check

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Chrome 146 on Windows
View result in a separate tab
typeof check
886K/s
instanceof check
452K/s
constructor check
95K/s
View exact numbers
Test name Executions per second
typeof check 885,966 Ops/sec
instanceof check 452,259 Ops/sec
constructor check 94,510 Ops/sec