unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.38k stars 178 forks source link

Move numbering systems field over to DecimalSymbolsStrs #5830

Closed Manishearth closed 1 week ago

Manishearth commented 1 week ago

Depends on https://github.com/unicode-org/icu4x/pull/5822

Minor win:

Before: decimal/symbols@2, <total>, 2740B, 1368B, 49 unique payloads
After:  decimal/symbols@2, <total>, 2657B, 1285B, 49 unique payloads

And an 8 byte win on FDF stack size.

Manishearth commented 1 week ago

@sffc Thought: do you think we can get away with Index8 for DecimalSymbolStrs? Each one of its entries is at worst 3 characters (when it contains bidi format characters), and then there's the ascii numbering system, at worst 8 bytes.

(8 numsys bytes) + (3 chars) * (2-4 bytes per char) * (6 fields) is 44-80, which is still well in range for a u8.

sffc commented 1 week ago

Yes we should definitely use Index8

dpulls[bot] commented 1 week ago

:tada: All dependencies have been resolved !

Manishearth commented 1 week ago
Before: decimal/symbols@2, <total>, 2657B, 1285B, 49 unique payloads
After:  decimal/symbols@2, <total>, 2363B, 991B, 49 unique payloads

For Index8.