Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.63
Chrome 110
Windows
Desktop
one year ago
Test name Executions per second
RegExp.test (BOOLEAN) 3678228.8 Ops/sec
String.includes (BOOLEAN) 8982703.0 Ops/sec
String.match (MULTIPLE) 3295651.2 Ops/sec
String.indexOf (MULTIPLE) 9220941.0 Ops/sec
String.search (MULTIPLE) 3721531.5 Ops/sec
RegExp.exec (MULTIPLE) 3285154.0 Ops/sec
Script Preparation code:
Tests:
  • RegExp.test (SINGLE)

  • String.includes (SINGLE)

  • String.match with regex (SINGLE)

  • String.indexOf (MULTIPLE)

  • String.search (SINGLE)

  • RegExp.exec (MULTIPLE)

  • String.match (SINGLE)

  • String.matchAll with regex(MULTIPLE)

  • String.matchAll (MULTIPLE)

  • String.search with regex (SINGLE)