Tests:

Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
Dictionary
13.1M/s
switch/case
488K/s

Fastest: Dictionary (26.8x faster)

View exact numbers
  • Dictionary: 13,060,366 ops/sec
  • switch/case: 488,029 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
    switch/case
    Dictionary

    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/131.0.0.0 Safari/537.36
Chrome 131 on Windows
View result in a separate tab
Dictionary
11.9M/s
switch/case
725K/s
View exact numbers
Test name Executions per second
Dictionary 11,907,991 Ops/sec
switch/case 725,271 Ops/sec