Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Mac OS X 10.15.7
Desktop
3 months ago
Test name Executions per second
DateTimeFormat single 25287.7 Ops/sec
toLocaleString single 26001.1 Ops/sec
DateTimeFormat 100 8142.2 Ops/sec
toLocaleString 100 273.1 Ops/sec
DateTimeFormat 10000 116.4 Ops/sec
toLocaleString 10000 2.6 Ops/sec
DateTimeFormat 4 23595.8 Ops/sec
toLocaleString 4 6589.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • DateTimeFormat single

  • toLocaleString single

  • DateTimeFormat 100

  • toLocaleString 100

  • DateTimeFormat 10000

  • toLocaleString 10000

  • DateTimeFormat 4

  • toLocaleString 4