Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0
Firefox 112
Linux
Desktop
one year ago
Test name Executions per second
character index 122379392.0 Ops/sec
charAt() 92968456.0 Ops/sec
startsWith() 88312080.0 Ops/sec
slice() 67157704.0 Ops/sec
RegExp 25632930.0 Ops/sec
charCodeAt 85409032.0 Ops/sec
character index again 110157528.0 Ops/sec
Script Preparation code:
Tests:
  • character index

  • charAt()

  • startsWith()

  • slice()

  • RegExp

  • charCodeAt

  • character index again


;