Run details:
Mozilla/5.0 (Linux; Android 12; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Mobile Safari/537.36
Chrome Mobile 100
Android
Mobile
2 years ago
Test name Executions per second
substring and substring 1663654.6 Ops/sec
replace inline regex 1868807.9 Ops/sec
replace compiled regex var 1468764.4 Ops/sec
brackets and substring 1756235.6 Ops/sec
brackets and slice 1723707.9 Ops/sec
substring and slice 1679857.4 Ops/sec
brackets and substr (legacy) 1758502.1 Ops/sec
substr and substr (legacy) 1743573.8 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)


;