Script Preparation code:
Tests:
  • Int switch

  • str switch

  • int if-else

  • str if-else

  • int object-key

  • str object-key

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Int switch
    str switch
    int if-else
    str if-else
    int object-key
    str object-key

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 18_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Mobile/15E148 Safari/604.1
Mobile Safari 18 on iOS 18.2
View result in a separate tab
Test name Executions per second
Int switch 584695.8 Ops/sec
str switch 527985.6 Ops/sec
int if-else 222489.5 Ops/sec
str if-else 185360.0 Ops/sec
int object-key 526102.8 Ops/sec
str object-key 355381.2 Ops/sec