Frommi / miniz_oxide

Rust replacement for miniz
MIT License
168 stars 48 forks source link

Remove lookup table from rustc-std builds #152

Closed GnomedDev closed 1 month ago

GnomedDev commented 1 month ago

Currently, at least 4kb of every Rust binary is taken up by miniz_oxide for this lookup table that can be computed at runtime without ruining performance. This is most likely a performance hit, but since this is only used by libstd for panic handling/backtraces (which are cold paths) this should be acceptable, at least under the rustc-dep-of-std flag.

I would give cargo bench output, but I can't get them running on my Arch Linux install due to -lminiz being missing.

oyvindln commented 1 month ago

Afaik the performance gain from using the lookup table here is mainly relevant for very short data as it's used when generating the huffman table so it probably won't be that relevant for rustc-dep-of-std

It was introduced in this pr: https://github.com/Frommi/miniz_oxide/pull/132

oyvindln commented 1 month ago

I've pushed a 0.7.3 version with that includes update to crates.io