Run details:
Mozilla/5.0 (Linux; Android 9; SM-G611MT) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.101 Mobile Safari/537.36
Chrome Mobile 98
Android
Mobile
2 years ago
Test name Executions per second
if else if 15689.4 Ops/sec
if else 340995.8 Ops/sec
if if 341041.2 Ops/sec
switch case 17370.1 Ops/sec
indexOf 17362.2 Ops/sec
if != && 16678.0 Ops/sec
if == && 18738.9 Ops/sec
if != || 18503.0 Ops/sec
if || 16119.9 Ops/sec
if if if ... 15858.5 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...