Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Windows
Desktop
one year ago
Test name Executions per second
if else if 325212.9 Ops/sec
if else 7588674.0 Ops/sec
if if 7611998.5 Ops/sec
switch case 355983.4 Ops/sec
indexOf 323203.8 Ops/sec
if != && 315617.3 Ops/sec
if == && 349257.5 Ops/sec
if != || 345025.7 Ops/sec
if || 311520.3 Ops/sec
if if if ... 311271.9 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...