Script Preparation code:
Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    if / else if
    switch
    object lookup (literal)
    object lookup (null prototype)
    Map.get

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0
Chrome 151 on Windows
View result in a separate tab
object lookup (null prototype)
1K/s
Map.get
1K/s
object lookup (literal)
1K/s
switch
908/s
if / else if
854/s
View exact numbers
Test name Executions per second
object lookup (null prototype) 1,449 Ops/sec
Map.get 1,297 Ops/sec
object lookup (literal) 1,176 Ops/sec
switch 908 Ops/sec
if / else if 854 Ops/sec