Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Firefox 115
Linux
Desktop
one year ago
Test name Executions per second
substring 40669772.0 Ops/sec
replace inline regex 12442266.0 Ops/sec
replace compiled regex var 12867717.0 Ops/sec
slice 43506348.0 Ops/sec
Script Preparation code:
Tests:
  • substring

  • replace inline regex

  • replace compiled regex var

  • slice