Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36
Chrome 93
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
if else if 87020.9 Ops/sec
if else 5255213.0 Ops/sec
if if 5303110.5 Ops/sec
switch case 89634.0 Ops/sec
indexOf 88872.6 Ops/sec
if != && 86412.8 Ops/sec
if == && 90084.4 Ops/sec
if != || 89775.8 Ops/sec
if || 86009.1 Ops/sec
if if if ... 85655.1 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...