Run details:
Mozilla/5.0 (Linux; Android 9; TA-1012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.112 Mobile Safari/537.36
Chrome Mobile 74
Android
Mobile
5 years ago
Test name Executions per second
substring and substring 1234584.5 Ops/sec
replace inline regex 1539416.5 Ops/sec
replace compiled regex var 1215839.0 Ops/sec
brackets and substring 1452996.8 Ops/sec
brackets and slice 1468602.5 Ops/sec
substring and slice 1240218.6 Ops/sec
brackets and substr (legacy) 1468400.6 Ops/sec
substr and substr (legacy) 1238949.6 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)


;