Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36
Chrome 75
Windows
Desktop
5 years ago
Test name Executions per second
if else if 145761.4 Ops/sec
if 11754536.0 Ops/sec
if else 4233789.0 Ops/sec
if if 4211550.5 Ops/sec
switch case 154803.3 Ops/sec
indexOf 146034.9 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...