Help optimizing UnCompress for gzipped files
Adam D. Ruppe
destructionator at gmail.com
Tue Jan 2 13:51:29 UTC 2018
On Tuesday, 2 January 2018 at 10:27:11 UTC, Christian Köstlin
wrote:
> After this I analyzed the first step of the process (gunzipping
> the data from a file to memory), and found out, that dlangs
> UnCompress is much slower than java, and ruby and plain c.
Yeah, std.zlib is VERY poorly written. You can get much better
performance by just calling the C functions yourself instead.
(You can just import import etc.c.zlib; it is included still)
Improving it would mean changing the public API. I think the
one-shot compress/uncompress functions are ok, but the streaming
class does a lot of unnecessary work inside like copying stuff
around.
More information about the Digitalmars-d-learn
mailing list