Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Windows
Desktop
one year ago
Test name Executions per second
if else if 207491.3 Ops/sec
if else 4984974.5 Ops/sec
if if 4964181.5 Ops/sec
switch case 231172.2 Ops/sec
indexOf 226765.8 Ops/sec
if != && 214326.2 Ops/sec
if == && 232902.9 Ops/sec
if != || 200074.5 Ops/sec
if || 214820.2 Ops/sec
if if if ... 216857.8 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...