Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Windows
Desktop
one year ago
Test name Executions per second
if else if 215997.9 Ops/sec
if else 4792905.0 Ops/sec
if if 4962323.5 Ops/sec
switch case 228863.8 Ops/sec
indexOf 216808.6 Ops/sec
if != && 207208.9 Ops/sec
if == && 226985.5 Ops/sec
if != || 228094.9 Ops/sec
if || 211380.4 Ops/sec
if if if ... 204954.4 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...