Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0
Firefox 122
Ubuntu
Desktop
11 months ago
Test name Executions per second
if else if 140625.7 Ops/sec
if else 120939352.0 Ops/sec
if if 120140384.0 Ops/sec
switch case 136638.5 Ops/sec
indexOf 136391.5 Ops/sec
if != && 137613.3 Ops/sec
if == && 138781.6 Ops/sec
if != || 136205.7 Ops/sec
if || 133694.4 Ops/sec
if if if ... 141375.4 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...