Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Windows
Desktop
one year ago
Test name Executions per second
if else if 145393.8 Ops/sec
if else 3264849.2 Ops/sec
if if 3170959.8 Ops/sec
switch case 154546.6 Ops/sec
indexOf 142527.7 Ops/sec
if != && 118145.3 Ops/sec
if == && 123673.3 Ops/sec
if != || 119483.3 Ops/sec
if || 115896.6 Ops/sec
if if if ... 104123.0 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...