Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
if else if 507448.2 Ops/sec
if else 12597404.0 Ops/sec
if if 12626031.0 Ops/sec
switch case 546657.2 Ops/sec
indexOf 521763.1 Ops/sec
if != && 465254.2 Ops/sec
if == && 528717.2 Ops/sec
if != || 546430.1 Ops/sec
if || 497568.3 Ops/sec
if if if ... 432435.3 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...


;