diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2017-01-02 13:52:20 +0100 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2017-01-03 08:28:58 +0100 |
| commit | 3b208d2dac15237a46eb82c03bcc70a2b1165d20 (patch) | |
| tree | 37921ac57ddcb4217550af49098d0c96ce4d9dae /.gitignore | |
| parent | 90c7c05ecb5f6b71e64295a14adf461b044815ba (diff) | |
| download | rust-3b208d2dac15237a46eb82c03bcc70a2b1165d20.tar.gz rust-3b208d2dac15237a46eb82c03bcc70a2b1165d20.zip | |
Reduce the size of static data in std_unicode::tables.
`BoolTrie` works well for sets of code points spread out through most of Unicode’s range, but is uses a lot of space for sets with few, mostly low, code points. This switches a few of its instances to a similar but simpler trie data structure. ## Before `size_of::<BoolTrie>()` is 1552, which is added to `table.r3.len() * 8 + t.r5.len() + t.r6.len() * 8`: * `Cc_table`: 1632 * `White_Space_table`: 1656 * `Pattern_White_Space_table`: 1640 * Total: 4928 bytes ## After `size_of::<SmallBoolTrie>()` is 32, which is added to `t.r1.len() + t.r2.len() * 8`: * `Cc_table`: 51 * `White_Space_table`: 273 * `Pattern_White_Space_table`: 193 * Total: 517 bytes ## Difference Every Rust program with `std` statically linked should be about 4 KB smaller.
Diffstat (limited to '.gitignore')
| -rw-r--r-- | .gitignore | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore index bf66eabc1c8..8b141416e4f 100644 --- a/.gitignore +++ b/.gitignore @@ -73,12 +73,13 @@ __pycache__/ /obj/ /rt/ /rustllvm/ -/src/libunicode/DerivedCoreProperties.txt -/src/libunicode/EastAsianWidth.txt -/src/libunicode/HangulSyllableType.txt -/src/libunicode/PropList.txt -/src/libunicode/Scripts.txt -/src/libunicode/UnicodeData.txt +/src/libstd_unicode/DerivedCoreProperties.txt +/src/libstd_unicode/DerivedNormalizationProps.txt +/src/libstd_unicode/PropList.txt +/src/libstd_unicode/ReadMe.txt +/src/libstd_unicode/Scripts.txt +/src/libstd_unicode/SpecialCasing.txt +/src/libstd_unicode/UnicodeData.txt /stage[0-9]+/ /target /test/ |
