Intl.NumberFormat

Benchmark created on


Setup

const values = (new Array(10_000)).fill(0).map((_, i) => i)

Test runner

Ready to run.

Testing in
TestOps/sec
Intl.NumberFormat on Each
values.map(value => {
	return new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(
    value,
  )
})
ready
Shared Intl.NumberFormat
const format = new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" })

values.map(value => {
	return format.format(value);	
})
ready

Revisions

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