blob: 3de91563d5c25e95be9b3280eb5621bf509fed2f [file] [edit]
// Toggle `complex` by hand to measure alternating-locale constructions.
const complex = false;
const iterations = 1000000;
let dtf;
if (!complex) {
for (let i = 0; i < iterations; i++) {
dtf = new Intl.DateTimeFormat();
}
} else {
for (let i = 0; i < iterations; i++) {
dtf = new Intl.DateTimeFormat(i % 2 ? "en-US" : "en-GB");
}
}