Run details:
Mozilla/5.0 (Linux; Android 10; Redmi Note 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.104 Mobile Safari/537.36
Chrome Mobile 96
Android
Mobile
2 years ago
Test name Executions per second
substring and substring 890125.8 Ops/sec
replace inline regex 1006640.0 Ops/sec
replace compiled regex var 772418.9 Ops/sec
brackets and substring 906127.5 Ops/sec
brackets and slice 902080.6 Ops/sec
substring and slice 910636.8 Ops/sec
brackets and substr (legacy) 897084.4 Ops/sec
substr and substr (legacy) 908191.9 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)


;