Run details:
Mozilla/5.0 (Linux; Android 11; Pixel 4a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Mobile Safari/537.36
Chrome Mobile 89
Android
Mobile
3 years ago
Test name Executions per second
substring and substring 1339723.0 Ops/sec
replace inline regex 1547383.1 Ops/sec
replace compiled regex var 1251478.1 Ops/sec
brackets and substring 1293894.4 Ops/sec
brackets and slice 1313207.1 Ops/sec
substring and slice 1307120.0 Ops/sec
brackets and substr (legacy) 1309264.8 Ops/sec
substr and substr (legacy) 1315518.1 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)


;