Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
Firefox 101
Windows
Desktop
2 years ago
Test name Executions per second
if else if 84596.7 Ops/sec
if else 112028480.0 Ops/sec
if if 88428992.0 Ops/sec
switch case 80726.9 Ops/sec
indexOf 69121.6 Ops/sec
if != && 75341.7 Ops/sec
if == && 83262.0 Ops/sec
if != || 83584.3 Ops/sec
if || 85397.6 Ops/sec
if if if ... 87109.4 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...