zlib acceleration?

René J.V. Bertin rjvbertin at gmail.com
Fri May 29 06:20:57 PDT 2015


On Friday May 29 2015 14:52:04 Rainer Müller wrote:

>Looking at the CloudFlare patch, the implementation does not seem to
>check for availability of the SSE 4 instruction set with CPUID and does
>not offer any fallback.

No, but one could do the test before building, even to the extent of rejecting the variant if the host doesn't support SSE4. Which would be enough if the patched port is never distributed in binary form.

>Especially this GPL header here bothers me a lot:
>https://github.com/cloudflare/zlib/blob/gcc.amd64/contrib/amd64/crc32-pclmul_asm.S

That file doesn't build on OS X so it'd be excluded in any event, so if that's the only file concerned by licensing issues the argument is moot.
My plan is to create a patch of CloudFlare's sources against the release stock zlib version, so it'll be easy enough to remove the file before making the patch.

>After applying this to the zlib port, the resulting binary would
>certainly be covered by the GPL-2 and not the zlib license anymore. That
>would introduce lots of compatibility problems.

I don't see how it would do more than make the port non-distributable in binary form, which is a moot point if the patch is included in a non-default variant as I plan to. And anyone who distributes software with the binary library included will have the option of installing the port in stock zlib form, regardless of whether the "turbo" variant is default or not.

>
>Even if this CloudFlare patch offers any performance improvements, the

Have you actually looked at the benchmark results? 
>for further distribution. In this form, it will never be included
>upstream and we should not do it either.

MacPorts users are grown-up and vaccinated for the most part, and can make licensing related decisions for themselves (and bear any consequences).

In any case, I'll do as announced, and post message when I have an adapted port I'm satisfied with.

>Unfortunately, I couldn't find any zlib mailing list archive containing
>the discussion of including the Intel patches.

It's supposed to have taken place, but the only link I've seen has gone stale.

R.


More information about the macports-users mailing list