Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0
Firefox 92
Ubuntu
Desktop
3 years ago
Test name Executions per second
if else if 22012.3 Ops/sec
if else 77387272.0 Ops/sec
if if 76842928.0 Ops/sec
switch case 26841.6 Ops/sec
indexOf 25598.1 Ops/sec
if != && 25269.2 Ops/sec
if == && 25804.0 Ops/sec
if != || 23386.9 Ops/sec
if || 24691.9 Ops/sec
if if if ... 24441.8 Ops/sec
Script Preparation code:
Tests:
  • if else if

  • if else

  • if if

  • switch case

  • indexOf

  • if != &&

  • if == &&

  • if != ||

  • if ||

  • if if if ...