Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Chrome 115
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
short endsWith 30292112.0 Ops/sec
short regexp 12150883.0 Ops/sec
short charAt 18319946.0 Ops/sec
short brackets 18380632.0 Ops/sec
short CharCodeAt 18623130.0 Ops/sec
short slice 33697352.0 Ops/sec
short substr 33717244.0 Ops/sec
short substring 17748534.0 Ops/sec
long endsWidth 30253728.0 Ops/sec
long regexp 12219136.0 Ops/sec
long charAt 18308702.0 Ops/sec
long brackets 18372322.0 Ops/sec
long charCodeAt 18644590.0 Ops/sec
long slice 33707272.0 Ops/sec
long substr 33600424.0 Ops/sec
long substring 17744918.0 Ops/sec
Script Preparation code:
Tests:
  • short endsWith

  • short regexp

  • short charAt

  • short brackets

  • short CharCodeAt

  • short slice

  • short substr

  • short substring

  • long endsWidth

  • long regexp

  • long charAt

  • long brackets

  • long charCodeAt

  • long slice

  • long substr

  • long substring