Run details:
Mozilla/5.0 (Linux; Android 13; Pixel 6 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36
Chrome Mobile 111
Android
Mobile
one year ago
Test name Executions per second
substring and substring 3358831.0 Ops/sec
replace inline regex 3285329.0 Ops/sec
replace compiled regex var 2619900.0 Ops/sec
brackets and substring 3189754.0 Ops/sec
brackets and slice 3216441.0 Ops/sec
substring and slice 3153508.0 Ops/sec
brackets and substr (legacy) 3167580.0 Ops/sec
substr and substr (legacy) 3050125.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)