Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Chrome 107
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
if else if 315011.9 Ops/sec
if else 8975308.0 Ops/sec
if if 9054661.0 Ops/sec
switch case 327962.7 Ops/sec
indexOf 320295.5 Ops/sec
if != && 307177.8 Ops/sec
if == && 332017.8 Ops/sec
if != || 329764.0 Ops/sec
if || 315575.1 Ops/sec
if if if ... 320934.1 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...


;