Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:130.0) Gecko/20100101 Firefox/130.0
Firefox 130
Mac OS X 10.15
Desktop
2 months ago
Test name Executions per second
Switch 146568.8 Ops/sec
Object Literal 148262.1 Ops/sec
If Else 142082.2 Ops/sec
Object Literal defined outside function 146005.6 Ops/sec
Map 129201.2 Ops/sec
Map - defined outsid function 128984.9 Ops/sec
Script Preparation code:
Tests:
  • Switch

  • Object Literal

  • If Else

  • Object Literal defined outside function

  • Map

  • Map - defined outsid function


;