Run details:
Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36 Edg/96.0.1054.43
Chrome 96
Windows
Desktop
3 years ago
Test name Executions per second
array includes 8065943.0 Ops/sec
string includes 6129047.0 Ops/sec
regex test 6202559.0 Ops/sec
switch case 1524952320.0 Ops/sec
Script Preparation code:
Tests:
  • array includes

  • string includes

  • regex test

  • switch case