Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Windows
Desktop
5 months ago
Test name Executions per second
short endsWith 18433988.0 Ops/sec
short regexp 8219703.5 Ops/sec
short charAt 9685357.0 Ops/sec
short brackets 9901799.0 Ops/sec
short CharCodeAt 10093338.0 Ops/sec
short slice 18124416.0 Ops/sec
short substr 17922024.0 Ops/sec
short substring 9876030.0 Ops/sec
long endsWidth 18529908.0 Ops/sec
long regexp 8375744.5 Ops/sec
long charAt 9885878.0 Ops/sec
long brackets 10084123.0 Ops/sec
long charCodeAt 10303986.0 Ops/sec
long slice 18120978.0 Ops/sec
long substr 18134594.0 Ops/sec
long substring 9552300.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


;