Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15
Safari 17
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
new Intl.DateTimeFormat.format() 11380.9 Ops/sec
cached Intl.DateTimeFormat.format() 575705.0 Ops/sec
new Intl.DateTimeFormat.formatToParts 11237.4 Ops/sec
cached Intl.DateTimeFormat.formatToParts() 389241.4 Ops/sec
Script Preparation code:
Tests:
  • new Intl.DateTimeFormat.format()

  • cached Intl.DateTimeFormat.format()

  • new Intl.DateTimeFormat.formatToParts

  • cached Intl.DateTimeFormat.formatToParts()