Script Preparation code:
Tests:

Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
in
40.3M/s
bool
40.0M/s
typeof
40.0M/s
hasOwnProperty
36.3M/s
undefined
15.3M/s

Fastest: in (2.6x faster)

View exact numbers
  • in: 40,256,368 ops/sec
  • bool: 40,030,328 ops/sec
  • typeof: 40,006,620 ops/sec
  • hasOwnProperty: 36,303,760 ops/sec
  • undefined: 15,278,778 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
    undefined
    typeof
    in
    hasOwnProperty
    bool

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121 on Windows
View result in a separate tab
in
20.2M/s
typeof
20.0M/s
bool
19.2M/s
hasOwnProperty
18.1M/s
undefined
7.4M/s
View exact numbers
Test name Executions per second
in 20,244,816 Ops/sec
typeof 20,021,340 Ops/sec
bool 19,194,742 Ops/sec
hasOwnProperty 18,133,332 Ops/sec
undefined 7,440,731 Ops/sec