Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1
Mobile Safari 17
iOS 17.5
Mobile
2 months ago
Test name Executions per second
substring and substring 8369770.5 Ops/sec
replace inline regex 8027241.5 Ops/sec
replace compiled regex var 6420215.5 Ops/sec
brackets and substring 7613045.5 Ops/sec
brackets and slice 7073070.5 Ops/sec
substring and slice 7440428.5 Ops/sec
brackets and substr (legacy) 5794234.0 Ops/sec
substr and substr (legacy) 7205939.5 Ops/sec
Script Preparation code:
Tests:
  • substring and substring

  • replace inline regex

  • replace compiled regex var

  • brackets and substring

  • brackets and slice

  • substring and slice

  • brackets and substr (legacy)

  • substr and substr (legacy)


;