Tests:

Historical Performance Data aggregated from 21 community runs

Desktop Results:
Chrome 15 runs
switch
4.8M/s
lookup
912K/s

Fastest: switch (5.3x faster)

View exact numbers
  • switch: 4,813,464 ops/sec
  • lookup: 911,975 ops/sec
Firefox 6 runs
lookup
1.0M/s
switch
547K/s

Fastest: lookup (1.9x faster)

View exact numbers
  • lookup: 1,014,664 ops/sec
  • switch: 546,560 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
    lookup
    switch

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0
Firefox 151 on Windows
View result in a separate tab
lookup
1.4M/s
switch
907K/s
View exact numbers
Test name Executions per second
lookup 1,411,856 Ops/sec
switch 907,069 Ops/sec