Frommi / miniz_oxide

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

Speed up adler32 #76

Closed Shnatsel closed 4 years ago

Shnatsel commented 4 years ago

When decoding lightly compressed data the majority of the time is spent in adler32::RollingAdler32::update_buffer, so even small speedups in it will translate to measurable speeupds in the entire decoding.

Profiling results from miniz-oxide branch of png crate to back this up: https://perfht.ml/2V3ml3q

Shnatsel commented 4 years ago

This has been encountered in other languages as well, and steps taken to optimize (non-Rust) implementations. See e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=762564

Shnatsel commented 4 years ago

I've looked into adler32 crate and it's already heavily optimized - seemingly to the extent of what's possible without explicit SIMD, so closing this as infeasible.