Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Chrome 113
Windows
Desktop
one year ago
Test name Executions per second
if else if 355406.2 Ops/sec
if else 7864740.5 Ops/sec
if if 7854985.0 Ops/sec
switch case 375699.9 Ops/sec
indexOf 362461.1 Ops/sec
if != && 340428.6 Ops/sec
if == && 375489.7 Ops/sec
if != || 373677.4 Ops/sec
if || 339517.6 Ops/sec
if if if ... 337700.7 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...