use Decompress::reset() instead of recreating in DeflateDecoder#514
use Decompress::reset() instead of recreating in DeflateDecoder#514Byron merged 1 commit intorust-lang:mainfrom
Conversation
Byron
left a comment
There was a problem hiding this comment.
This is a great catch, thanks a lot!
From the Git history, I also couldn't see if this was needed or intentional at some point, so doing a reset seems like a much better choice here.
Let's have @jongiddy for a second pair of eyes on this one line change for good measure :).
jongiddy
left a comment
There was a problem hiding this comment.
Yes, it would be nice to know why this was changed many years ago to avoid the reset. I cannot see a problem with accepting it now.
|
Thank you! Then I'd say we merge it, as I'd expect to have seen 'something codified' coming with In the worst case we have to roll it back, which seems particularly easy in this case, in the best there is a significant performance improvement for those who have been using the |
From https://www.zlib.net/manual.html
This led to a ~14% performance improvement on my workloads with
MultiGZDecoder.