Reusing Intl.DateTimeFormat instances

Benchmark created on


Setup

window.formatter = new Intl.DateTimeFormat('en')
const date = new Date()

Teardown

window.formatter = undefined

Test runner

Ready to run.

Testing in
TestOps/sec
Fresh instance
const formatter = new Intl.DateTimeFormat('en')
formatter.format(date)
ready
Reused instance
formatter.format(date)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.