Run details:
Mozilla/5.0 (iPad; CPU OS 14_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/176.0.394746740 Mobile/15E148 Safari/604.1
Mobile Safari 14
iOS 14.7
Tablet
3 years ago
Test name Executions per second
substring and substring 2296387.8 Ops/sec
replace inline regex 2812801.5 Ops/sec
replace compiled regex var 2246110.0 Ops/sec
brackets and substring 2428307.8 Ops/sec
brackets and slice 2452824.5 Ops/sec
substring and slice 2380676.2 Ops/sec
brackets and substr (legacy) 2422573.5 Ops/sec
substr and substr (legacy) 2327312.0 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)


;