| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
@ol...@chromium.org: PTAL, this needs a second reviewer and you're probably closer to any `Intl` work than I am. 😊
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Hi, thanks for this patch. I am a bit worried though that this is just blindly applying a pattern. Do you have a usecase where the performance of the locale constructor is relevant? And if you have one, did you measure this CL?
Is this function really a the bottleneck in the locale constructor? And if it is, given how small valid variant strings are and how few `-` we expect, I am pretty sure that a linear search would be faster.
I ran this CL against a microbench and didn't see any improvement.
```
let t = performance.now();
for (let i = 0; i < 100000; ++i) {
new Intl.Locale("sl-rozaj-biske");
new Intl.Locale("sl", { variants: "rozaj-biske" });
}
console.log(performance.now() - t);
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Usually it's Frank who reviews these PRs.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |