Run details:
Mozilla/5.0 (Linux; Android 9; Redmi Note 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.105 Mobile Safari/537.36
Chrome Mobile 72
Android
Mobile
5 years ago
Test name Executions per second
Switch 52285.7 Ops/sec
Object Literal 47180.2 Ops/sec
Script Preparation code:
Tests:
  • Switch

  • Object Literal