Run details:
Mozilla/5.0 (Linux; Android 10; POCO F1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.111 Mobile Safari/537.36
Chrome Mobile 81
Android
Mobile
4 years ago
Test name Executions per second
substring and substring 1627478.8 Ops/sec
replace inline regex 1668806.8 Ops/sec
replace compiled regex var 1165870.1 Ops/sec
brackets and substring 1330855.4 Ops/sec
brackets and slice 1343284.8 Ops/sec
substring and slice 1332558.9 Ops/sec
brackets and substr (legacy) 1345626.1 Ops/sec
substr and substr (legacy) 1319964.2 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)


;