Script Preparation code:
Tests:

Historical Performance Data aggregated from 9 community runs

Desktop Results:
Chrome 9 runs
If
27.0M/s
Switch
26.8M/s
View exact numbers
  • If: 27,008,232 ops/sec
  • Switch: 26,765,936 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
    If
    Switch

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.1 Safari/605.1.15 Ddg/26.1
Safari 26 on Mac OS X 10.15.7
View result in a separate tab
Switch
577.9M/s
If
552.7M/s
View exact numbers
Test name Executions per second
Switch 577,947,456 Ops/sec
If 552,739,072 Ops/sec