Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
short endsWith 18253910.0 Ops/sec
short regexp 8110256.0 Ops/sec
short charAt 9356057.0 Ops/sec
short brackets 9294390.0 Ops/sec
short CharCodeAt 9808880.0 Ops/sec
short slice 16583537.0 Ops/sec
short substr 16457069.0 Ops/sec
short substring 8862557.0 Ops/sec
long endsWidth 16649596.0 Ops/sec
long regexp 8034733.0 Ops/sec
long charAt 9171561.0 Ops/sec
long brackets 9067296.0 Ops/sec
long charCodeAt 9789955.0 Ops/sec
long slice 16949260.0 Ops/sec
long substr 16767595.0 Ops/sec
long substring 8869425.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


;