Script Preparation code:
Tests:
  • if/else (true)

  • if/else if (true)

  • if/else (false)

  • if/else if (false)

  • ternary

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    if/else (true)
    if/else if (true)
    if/else (false)
    if/else if (false)
    ternary

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36
Chrome 94 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
if/else (true) 14761482.0 Ops/sec
if/else if (true) 14385689.0 Ops/sec
if/else (false) 14850152.0 Ops/sec
if/else if (false) 7479238.0 Ops/sec
ternary 14828110.0 Ops/sec


;