Is flate / gzip really as fast as it should be? #1078
Replies: 1 comment
-
First of all, without having the flamegraph, I am pretty sure you are misreading it. The read part is only a tiny fraction of the 33%: and The huffmanBufioReader function is doing the actual decoding. The standard library guarantees that if you provide an But even if we didn't, it wouldn't make sense to when we are given a Compared to the stdlib we generate the readers for each stdlib implementation of The reason that people are moving to zstd is mostly because of decompression speed. There isn't too much more that can be squeezed from inflate. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Using this library in docker/moby I noticed (on ARMv7 at-least) gzip decompression seems to occupy the largest share (33%) of work in a docker pull. I found this a bit surprising, especially what with all that filesystem work to install the extracted files in their layers.
This got me looking through the algorithm and I noticed that its reading byte by byte from the bufio source. While it is bufio surely this is not the fastest way to decode a hufman table?
Beta Was this translation helpful? Give feedback.
All reactions