Upper limit on size reduction by sharing Lower & Upper tables.
- Dominant language
- HTML
- Stars
- 1
- Forks
- 2
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 3
Description
Studying and experimenting with the ICU (International Components for Unicode) data
files for derived properties, such as LowerCase & UpperCase allowed me to
establish what I think is an upper bound for the number of bytes which can be
saved by having Character & re2s share data.
```
Approximate total byte saving from having Character & re2s use
the same Lower & Upper byte table:
>>> ((2340 + 1908) * 4)/1024
16.59375 KiB
2340 is L (lowercase) derived property table
1908 is U (uppercase) ibid.
This is from Unicode 12.1, so Unicode 7.0 saving would probably
be lower.
```
17 KiB is worth some effort, but we are not going to be saving a lot.
I am not sure if Character implements all the Java 8 methods using Unicode,
so there may be larger gains in the future.
In any case, correctness and keeping Character & re2s reporting the same thing
are useful goals, IMHO.
Just trying to put the potential effort expended & urgency in perspective relative
to potential gain.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.