Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Chrome 113
Linux
Desktop
one year ago
Test name Executions per second
new Intl.DateTimeFormat.format() 10095.9 Ops/sec
cached Intl.DateTimeFormat.format() 343642.6 Ops/sec
new Intl.DateTimeFormat.formatToParts 9557.8 Ops/sec
cached Intl.DateTimeFormat.formatToParts() 161500.5 Ops/sec
Script Preparation code:
Tests:
  • new Intl.DateTimeFormat.format()

  • cached Intl.DateTimeFormat.format()

  • new Intl.DateTimeFormat.formatToParts

  • cached Intl.DateTimeFormat.formatToParts()