Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Chrome 108
Windows
Desktop
one year ago
Test name Executions per second
if else if 25765.8 Ops/sec
if else 1536125.5 Ops/sec
if if 1052270.5 Ops/sec
switch case 19055.0 Ops/sec
indexOf 19649.0 Ops/sec
if != && 9645.2 Ops/sec
if == && 16668.9 Ops/sec
if != || 26786.6 Ops/sec
if || 24482.6 Ops/sec
if if if ... 23982.4 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...