Run details:
Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Chrome 86
Windows XP
Desktop
9 months ago
Test name Executions per second
Switch 16135.0 Ops/sec
Object Literal 15042.3 Ops/sec
Script Preparation code:
Tests:
  • Switch

  • Object Literal