-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce stack size of DecimalSymbolsV1 #4437
Comments
One downside of this would be that the Pixel Watch code, which directly constructs a DecimalSymbolsV1, would have to resort to manually constructing a VarZeroVec, which we try not to make a runtime problem. |
Here's a 112-byte version with no VarZeroVecs |
DecimalSymbolsV3 is probably just about the same performance-wise as DecimalSymbolsV1. VarZeroVecs add runtime cost for lookup. |
|
@sffc your design here would be optimized by the new MultiFieldsULE thing too, if we added ArrayVarULE |
The VarULE counterpart of TupleNULE Part of #5523. Planned to be used in #4437 I'm not super happy with the naming with this vs VarTupleULE, but I've tried to make it clearer with the module names and it's fine for now. We can rename as desired since zerovec isn't on the ICU4X stability track. I do plan to add serde/etc impls but that's going to be a separate PR. <!-- Thank you for your pull request to ICU4X! Reminder: try to use [Conventional Comments](https://conventionalcomments.org/) to make comments clearer. Please see https://github.com/unicode-org/icu4x/blob/main/CONTRIBUTING.md for general information on contributing to ICU4X. -->
Currency DecimalSymbolsV1 is 192 bytes. We should consider reducing that size since it is retained in a lot of other types, so we get a high ROI by reducing it. Here's a sandbox where I got it down to 56 bytes without sacrificing much:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5900f3431d428cb8b11695b6ca9dbeea
Other representations may be possible as well.
The text was updated successfully, but these errors were encountered: