Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Chrome 70
Windows
Desktop
5 years ago
Test name Executions per second
ifTest1 799076864.0 Ops/sec
ifTest2 802368320.0 Ops/sec
ifTest3 794501760.0 Ops/sec
switchTest1 698176064.0 Ops/sec
switchTest2 682383872.0 Ops/sec
switchTest3 702147392.0 Ops/sec
Object keys 798639552.0 Ops/sec
Script Preparation code:
Tests:
  • ifTest1

  • ifTest2

  • ifTest3

  • switchTest1

  • switchTest2

  • switchTest3

  • Object keys