Run details:
Mozilla/5.0 (Linux; Android 11; SM-G998U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.50 Mobile Safari/537.36
Chrome Mobile 95
Android
Mobile
3 years ago
Test name Executions per second
substring and substring 2198611.2 Ops/sec
replace inline regex 2338034.8 Ops/sec
replace compiled regex var 1882476.4 Ops/sec
brackets and substring 2270833.0 Ops/sec
brackets and slice 2179662.2 Ops/sec
substring and slice 2312211.2 Ops/sec
brackets and substr (legacy) 2140410.8 Ops/sec
substr and substr (legacy) 2118883.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)


;