Feature request: Update zlib static libraries for faster decompression
neurolabusc opened this issue · 6 comments
When using with FPC+Win64 SynZip.pas will link static\x86_64-win64sse*.o static libraries, providing access to the accelerated CloudFlare zlib. Can I suggest that the static libraries included with this repository are updated to the latest version of CloudFlare. A recently merged pull request has made the CloudFlare zlib ~33% faster at decompressing files.
This support is experimental and not available by default.
Any input is welcome, but I don't have time for this now.
If you look into the feedback and later benchmarks in the pull request on CF it is not sure that it is actually faster...
I have recompiled the CloudFlare zlib libraries and placed them here. Feel free to update the static files included with your repository.
You can test the performance benefit yourself with my benchmark. The feedback and benchmarks you are referring to were from me. However, the conclusion is that this patch does not improve gz compression, though it aids .z compression and both .gz and .z decompression. It accelerates .gz decompression by about ~16% (improving decompression but not CRC32 redundancy check), and it accelerates .z compression ~25% (since both the Adler32 redundancy check and decompression is improved).
I have updated .o files for Linux, MacOS and Windows. I used 3 different computers to compare performance, so one can not compare between operating systems.
On Linux, FPC TGZFileStream required 1770ms, SynZip required 1120ms, SynZip+CloudFlare2020 required 830ms
On MacOS, TGZFileStream required 1244ms, SynZip required 610ms, SynZip+CloudFlare2020 required 500ms
On Windows, TGZFileStream required 2724ms, SynZip+CloudFlare2018 required 1310ms, SynZip+CloudFlare2020 required 1200ms. So the new code is about 10% faster for decompression. It is a small but reliable impact.
I am currently integrating libdeflate to mORMot 2.
This is much faster than the CloudFlare zlib library.