Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Chrome 117
Windows
Desktop
one year ago
Test name Executions per second
if else if 206128.3 Ops/sec
if else 5128609.0 Ops/sec
if if 5181387.0 Ops/sec
switch case 211619.6 Ops/sec
indexOf 196662.9 Ops/sec
if != && 191544.7 Ops/sec
if == && 199617.8 Ops/sec
if != || 199293.1 Ops/sec
if || 189085.1 Ops/sec
if if if ... 184635.9 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...