Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Firefox 52
Windows 7
Other
2025 years ago
Test name Executions per second
ifTest1 2028905600.0 Ops/sec
ifTest2 2027134464.0 Ops/sec
ifTest3 2021463808.0 Ops/sec
switchTest1 2016828416.0 Ops/sec
switchTest2 1972695424.0 Ops/sec
switchTest3 1946547584.0 Ops/sec
Object keys 2007403520.0 Ops/sec
Script Preparation code:
Tests:
  • ifTest1

  • ifTest2

  • ifTest3

  • switchTest1

  • switchTest2

  • switchTest3

  • Object keys