Script Preparation code:
Tests:

Historical Performance Data aggregated from 8 community runs

Desktop Results:
Chrome 8 runs
Ternary
14.4M/s
Implicit coercion
14.3M/s
Custom function
7.7M/s
Boolean
5.5M/s

Fastest: Ternary (2.6x faster)

View exact numbers
  • Ternary: 14,390,820 ops/sec
  • Implicit coercion: 14,337,010 ops/sec
  • Custom function: 7,702,442 ops/sec
  • Boolean: 5,476,700 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
    Implicit coercion
    Ternary
    Boolean
    Custom function
    Equation

    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/138.0.0.0 Safari/537.36
Chrome 138 on Windows
View result in a separate tab
Boolean
122.0M/s
Custom function
118.5M/s
Implicit coercion
117.6M/s
Ternary
106.9M/s
Equation
52.3M/s
View exact numbers
Test name Executions per second
Boolean 121,976,296 Ops/sec
Custom function 118,458,976 Ops/sec
Implicit coercion 117,602,736 Ops/sec
Ternary 106,867,664 Ops/sec
Equation 52,323,804 Ops/sec