icu
icu copied to clipboard
ICU-22950 Do not initialize currency for NumberPropertyMapper when useCurrency is false
trafficstars
resolveCurrency() slows down simple number formatting requests like:
for (int i = 0; i < 9999; i++)
u_snprintf_u(buff, 100, u"%d", i);
Since icu4c doesn't use currency there, we can skip its initialization.
Checklist
- [x] Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22950
- [x] Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
- [x] Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
- [x] Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-1234 Fix xyz"
- [ ] Issue accepted (done by Technical Committee after discussion)
- [x] Tests included, if applicable
- [x] API docs and/or User Guide docs changed or added, if applicable
Hooray! The files in the branch are the same across the force-push. 😃
~ Your Friendly Jira-GitHub PR Checker Bot
The tests hadn't run again. I rebased, squashed, fixed a couple of typos in the commit message, force-pushed, and approved test runs.