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) 3163049.8 Ops/sec
String.includes (BOOLEAN) 8125935.0 Ops/sec
String.match (MULTIPLE) 3222130.8 Ops/sec
String.indexOf (MULTIPLE) 9067708.0 Ops/sec
String.search (MULTIPLE) 3682082.0 Ops/sec
RegExp.exec (MULTIPLE) 3297872.8 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)