Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0
Firefox 105
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
substring 112837392.0 Ops/sec
replace inline regex 27449816.0 Ops/sec
replace compiled regex var 27541708.0 Ops/sec
slice 58207904.0 Ops/sec
brackets and substr (legacy) 118077496.0 Ops/sec
Script Preparation code:
Tests:
  • substring

  • replace inline regex

  • replace compiled regex var

  • slice

  • brackets and substr (legacy)