Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
charCodeAt(300) 31360856.0 Ops/sec
[0].charCodeAt() 31118672.0 Ops/sec
[300].charCodeAt() 31089326.0 Ops/sec
+[0] 31186612.0 Ops/sec
+[300] 31279084.0 Ops/sec
Script Preparation code:
Tests:
  • charCodeAt(300)

  • [0].charCodeAt()

  • [300].charCodeAt()

  • +[0]

  • +[300]