Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
Chrome 83
Mac OS X 10.15.4
Desktop
4 years ago
Test name Executions per second
padLeft 191645.3 Ops/sec
slice 186600.8 Ops/sec
slice template literal 186911.5 Ops/sec
pad 135919.2 Ops/sec
HTML Preparation code:
Tests:
  • padLeft

  • slice

  • slice template literal

  • pad