Run details:
Mozilla/5.0 (Linux; Android 10; MAR-LX3A Build/HUAWEIMAR-L03A;) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.138 Mobile Safari/537.36
Chrome Mobile 81
Android
Mobile
one year ago
Test name Executions per second
substring and substring 1099795.0 Ops/sec
replace inline regex 1199658.0 Ops/sec
replace compiled regex var 941381.4 Ops/sec
brackets and substring 1090290.0 Ops/sec
brackets and slice 1091603.0 Ops/sec
substring and slice 1081779.0 Ops/sec
brackets and substr (legacy) 1099626.0 Ops/sec
substr and substr (legacy) 1105391.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)