089682611f
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. CC @raphlinus, who wrote the original `BoolTrie`. ## 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. |
||
---|---|---|
.. | ||
platform-intrinsics | ||
test-float-parse | ||
third-party | ||
adb_run_wrapper.sh | ||
apple-darwin.supp | ||
char_private.py | ||
check-sanitycheck.py | ||
check-summary.py | ||
CONFIGS.md | ||
ctags.rust | ||
debugger_pretty_printers_common.py | ||
dec2flt_table.py | ||
Dockerfile | ||
gdb_load_rust_pretty_printers.py | ||
gdb_rust_pretty_printing.py | ||
generate-deriving-span-tests.py | ||
generate-keyword-tests.py | ||
get-stage0.py | ||
htmldocck.py | ||
indenter | ||
lldb_batchmode.py | ||
lldb_rust_formatters.py | ||
local_stage0.sh | ||
make-win-dist.py | ||
mklldeps.py | ||
rust-gdb | ||
rust-lldb | ||
sugarise-doc-comments.py | ||
unicode.py | ||
x86.supp | ||
ziggurat_tables.py |