Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Windows
Desktop
2 years ago
Test name Executions per second
if else if 36750.3 Ops/sec
if else 3604888.8 Ops/sec
if if 3679734.5 Ops/sec
switch case 168232.6 Ops/sec
indexOf 156467.2 Ops/sec
if != && 140707.5 Ops/sec
if == && 166271.1 Ops/sec
if != || 161067.4 Ops/sec
if || 137615.9 Ops/sec
if if if ... 133738.2 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...