Run details:
Mozilla/5.0 (Linux; Android 13; SM-G780F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36
Chrome Mobile 108
Android
Mobile
one year ago
Test name Executions per second
substring and substring 1694683.0 Ops/sec
replace inline regex 2049899.0 Ops/sec
replace compiled regex var 1563287.0 Ops/sec
brackets and substring 1760174.0 Ops/sec
brackets and slice 1718930.0 Ops/sec
substring and slice 1736295.0 Ops/sec
brackets and substr (legacy) 1750162.0 Ops/sec
substr and substr (legacy) 1762050.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)