Run details:
Mozilla/5.0 (Android 10; Mobile; rv:88.0) Gecko/88.0 Firefox/88.0
Firefox Mobile 88
Android
Mobile
3 years ago
Test name Executions per second
substring and substring 3597172.0 Ops/sec
replace inline regex 1853258.0 Ops/sec
replace compiled regex var 1901953.0 Ops/sec
brackets and substring 6623697.0 Ops/sec
brackets and slice 6610608.0 Ops/sec
substring and slice 3710751.0 Ops/sec
brackets and substr (legacy) 6659790.0 Ops/sec
substr and substr (legacy) 3739850.0 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)