Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome 122
Linux
Desktop
8 months ago
Test name Executions per second
if else if 241945.8 Ops/sec
if else 8572515.0 Ops/sec
if if 8409821.0 Ops/sec
switch case 210016.4 Ops/sec
indexOf 206609.9 Ops/sec
if != && 159638.6 Ops/sec
if == && 189971.9 Ops/sec
if != || 199964.4 Ops/sec
if || 178525.2 Ops/sec
if if if ... 151909.5 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...


;