Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
Firefox 91
Windows
Desktop
3 years ago
Test name Executions per second
if else if 67830.2 Ops/sec
if else 119865248.0 Ops/sec
if if 119147904.0 Ops/sec
switch case 67922.6 Ops/sec
indexOf 67032.2 Ops/sec
if != && 67606.8 Ops/sec
if == && 68777.2 Ops/sec
if != || 68111.8 Ops/sec
if || 68284.2 Ops/sec
if if if ... 67270.6 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...