Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Chrome 116
Windows
Desktop
one year ago
Test name Executions per second
short endsWith 14390912.0 Ops/sec
short regexp 6355146.0 Ops/sec
short charAt 7170105.0 Ops/sec
short brackets 7139694.5 Ops/sec
short CharCodeAt 7294374.5 Ops/sec
short slice 13397663.0 Ops/sec
short substr 13539083.0 Ops/sec
short substring 7083497.0 Ops/sec
long endsWidth 14538175.0 Ops/sec
long regexp 6468928.5 Ops/sec
long charAt 7095378.5 Ops/sec
long brackets 7215776.0 Ops/sec
long charCodeAt 7233360.0 Ops/sec
long slice 13919343.0 Ops/sec
long substr 13529707.0 Ops/sec
long substring 7089541.5 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


;