Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Mobile/15E148 Safari/604.1
Mobile Safari 15
iOS 15.3
Mobile
2 years ago
Test name Executions per second
if else if 227910.7 Ops/sec
if else 1342530.1 Ops/sec
if if 1340913.9 Ops/sec
switch case 272081.9 Ops/sec
indexOf 254470.5 Ops/sec
if != && 213681.8 Ops/sec
if == && 257725.3 Ops/sec
if != || 229383.7 Ops/sec
if || 209677.8 Ops/sec
if if if ... 192291.1 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...