Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Mac OS X 10.14.6
Desktop
one year ago
Test name Executions per second
if else if 159763.6 Ops/sec
if else 4217945.5 Ops/sec
if if 3924396.2 Ops/sec
switch case 167875.8 Ops/sec
indexOf 171312.0 Ops/sec
if != && 155626.4 Ops/sec
if == && 156609.0 Ops/sec
if != || 174549.0 Ops/sec
if || 146802.5 Ops/sec
if if if ... 153840.3 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...