Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0
Firefox 105
Ubuntu
Desktop
2 years ago
Test name Executions per second
if else if 100627.1 Ops/sec
if else 146240688.0 Ops/sec
if if 141787360.0 Ops/sec
switch case 101122.5 Ops/sec
indexOf 100778.6 Ops/sec
if != && 103041.1 Ops/sec
if == && 103888.0 Ops/sec
if != || 102797.1 Ops/sec
if || 103185.8 Ops/sec
if if if ... 103248.6 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...