Search code examples
clinuxzlib

Is CloudFlare fork of zlib optimized only for amd?


I extensively use zlib for storing compressed data. While reading data most of the time is spent in inflate_fast and crc32 zlib calls. I am exploring alternatives to speed-up decompression and have two candidates, ipp_zlib from Intel and zlib fork from CloudFlare. I would like to know:

  1. Is CloudFlare fork tuned only for AMD processors ? I see that related branch is tagged with 'amd64' at https://github.com/cloudflare/zlib/branches. I have Intel CPUs, so amd64 won't serve the purpose.

  2. Whether I need to rewrite data to use CloudFlare version ? If yes, then I will have to ignore this library.

I tried getting both libraries for my Linux machine, but don't see easy way i.e. download link. If anyone installed above, please share instructions to download and build.


Solution

  • In fact Cloudflare version of gzip is optimized for Intel Haswell processors. It is 100% gzip compliant. It is however optimized for high speed compression and does not improve the compression ratio. If you only use statically compressed content, there is not much benefit.