Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Windows
Desktop
one year ago
Test name Executions per second
if else if 318850.8 Ops/sec
if else 6912873.0 Ops/sec
if if 7054900.5 Ops/sec
switch case 340085.5 Ops/sec
indexOf 328581.4 Ops/sec
if != && 307020.5 Ops/sec
if == && 310684.6 Ops/sec
if != || 230387.3 Ops/sec
if || 166075.8 Ops/sec
if if if ... 271474.0 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...