Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15
Safari 14
Mac OS X 10.14.6
Desktop
one year ago
Test name Executions per second
if else if 410397.1 Ops/sec
if else 2560873.2 Ops/sec
if if 2605386.2 Ops/sec
switch case 451642.2 Ops/sec
indexOf 418285.7 Ops/sec
if != && 368806.1 Ops/sec
if == && 491130.4 Ops/sec
if != || 496835.3 Ops/sec
if || 396227.9 Ops/sec
if if if ... 381409.8 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...


;