Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0
Firefox 99
Ubuntu
Desktop
2 years ago
Test name Executions per second
if else if 49371.1 Ops/sec
if else 93478296.0 Ops/sec
if if 92928800.0 Ops/sec
switch case 48389.3 Ops/sec
indexOf 47401.5 Ops/sec
if != && 47953.3 Ops/sec
if == && 48000.6 Ops/sec
if != || 47472.8 Ops/sec
if || 47856.2 Ops/sec
if if if ... 47792.7 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...