Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
regex.test 10380237.0 Ops/sec
string.match 5309315.5 Ops/sec
string.includes 10919467.0 Ops/sec
string.startsWith 7319304.5 Ops/sec
String.localeCompare 262219.8 Ops/sec
String === 10898634.0 Ops/sec
Script Preparation code:
Tests:
  • regex.test

  • string.match

  • string.includes

  • string.startsWith

  • String.localeCompare

  • String ===


;