Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0
Firefox 90
Windows
Desktop
3 years ago
Test name Executions per second
if else if 65862.4 Ops/sec
if else 125821952.0 Ops/sec
if if 126179328.0 Ops/sec
switch case 69701.7 Ops/sec
indexOf 69659.4 Ops/sec
if != && 68533.4 Ops/sec
if == && 70004.7 Ops/sec
if != || 70218.1 Ops/sec
if || 70034.3 Ops/sec
if if if ... 69518.5 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...