Run details:
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
Firefox 82
Fedora
Desktop
one year ago
Test name Executions per second
re.match (regexp) 10158847.0 Ops/sec
re.match (string) 2811995.0 Ops/sec
re.test 14524993.0 Ops/sec
str.startsWith 26785078.0 Ops/sec
str.indexOf 24555112.0 Ops/sec
Script Preparation code:
Tests:
  • re.match (regexp)

  • re.match (string)

  • re.test

  • str.startsWith

  • str.indexOf