Run details:
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36
Chrome 70
Windows 8.1
Desktop
5 years ago
Test name Executions per second
slice [1K char range] 2319095.2 Ops/sec
substr [1K char range] 2327227.5 Ops/sec
substring [1K char range] 2316149.2 Ops/sec
slice [10 char range] 2353290.2 Ops/sec
substr [10 char range] 2371885.2 Ops/sec
substring [10 char range] 2392943.8 Ops/sec
Script Preparation code:
Tests:
  • slice [1K char range]

  • substr [1K char range]

  • substring [1K char range]

  • slice [10 char range]

  • substr [10 char range]

  • substring [10 char range]


;