Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Mac OS X 10.15.7
Desktop
20 days ago
Test name Executions per second
if else if 417788.3 Ops/sec
if else 107549608.0 Ops/sec
if if 108919400.0 Ops/sec
switch case 417386.4 Ops/sec
indexOf 403728.8 Ops/sec
if != && 407951.0 Ops/sec
if == && 411941.1 Ops/sec
if != || 400955.8 Ops/sec
if || 407425.6 Ops/sec
if if if ... 415906.3 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...