Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Chrome 69
Linux
Desktop
5 years ago
Test name Executions per second
ifTest1 366530432.0 Ops/sec
ifTest2 369344544.0 Ops/sec
ifTest3 336701280.0 Ops/sec
switchTest1 336310784.0 Ops/sec
switchTest2 341003296.0 Ops/sec
switchTest3 349538496.0 Ops/sec
Object keys 345521120.0 Ops/sec
Script Preparation code:
Tests:
  • ifTest1

  • ifTest2

  • ifTest3

  • switchTest1

  • switchTest2

  • switchTest3

  • Object keys