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 /src/rustc/rustdoc.rs | |
| 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 'src/rustc/rustdoc.rs')
0 files changed, 0 insertions, 0 deletions
