Run details:
Mozilla/5.0 (iPad; CPU OS 16_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.5.1
Tablet
10 months ago
Test name Executions per second
substring and substring 6438574.0 Ops/sec
replace inline regex 7177984.0 Ops/sec
replace compiled regex var 5785888.0 Ops/sec
brackets and substring 6761723.0 Ops/sec
brackets and slice 6758987.0 Ops/sec
substring and slice 6403477.0 Ops/sec
brackets and substr (legacy) 6432585.0 Ops/sec
substr and substr (legacy) 5901623.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)