Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    !! (number)
    Boolean() (number)
    ternary (number)
    !! (string)
    Boolean() (string)
    ternary (string)

    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; rv:124.0) Gecko/20100101 Firefox/124.0
Firefox 124 on Windows
View result in a separate tab
ternary (number)
989.5M/s
!! (string)
989.1M/s
!! (number)
986.8M/s
Boolean() (number)
984.9M/s
ternary (string)
984.0M/s
Boolean() (string)
982.5M/s
View exact numbers
Test name Executions per second
ternary (number) 989,451,904 Ops/sec
!! (string) 989,081,152 Ops/sec
!! (number) 986,763,008 Ops/sec
Boolean() (number) 984,892,480 Ops/sec
ternary (string) 984,012,736 Ops/sec
Boolean() (string) 982,467,200 Ops/sec