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) 3331553.0 Ops/sec
String.includes (BOOLEAN) 8864874.0 Ops/sec
String.match (MULTIPLE) 3266056.5 Ops/sec
String.indexOf (MULTIPLE) 8377502.0 Ops/sec
String.search (MULTIPLE) 3698174.2 Ops/sec
RegExp.exec (MULTIPLE) 3062319.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)