Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.6613.648 YaBrowser/24.10.4.648 (beta) Yowser/2.5 Safari/537.36
Yandex Browser 24
Linux
Desktop
23 days ago
Test name Executions per second
new Intl.DateTimeFormat.format() 13492.0 Ops/sec
cached Intl.DateTimeFormat.format() 485826.3 Ops/sec
new Intl.DateTimeFormat.formatToParts 13488.5 Ops/sec
cached Intl.DateTimeFormat.formatToParts() 228143.7 Ops/sec
Script Preparation code:
Tests:
  • new Intl.DateTimeFormat.format()

  • cached Intl.DateTimeFormat.format()

  • new Intl.DateTimeFormat.formatToParts

  • cached Intl.DateTimeFormat.formatToParts()