Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95
Windows
Desktop
2 years ago
Test name Executions per second
if else if 32568.2 Ops/sec
if else 68965856.0 Ops/sec
if if 67024528.0 Ops/sec
switch case 32959.3 Ops/sec
indexOf 33499.9 Ops/sec
if != && 31956.7 Ops/sec
if == && 26613.0 Ops/sec
if != || 34375.0 Ops/sec
if || 33997.2 Ops/sec
if if if ... 25535.0 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...


;