The math nerd in me really likes pclmul but agree it adds a lot of complexity for effectively x64-only features. I'll focus on getting slice-by-8 ready in this case anyway, I am waiting for a reply from the GNU copyright team and then am planning to just get this one thing all the way to the end.
On Tue, 15 Oct 2024 at 16:59, Pádraig Brady <p...@draigbrady.com> wrote: > On 15/10/2024 12:58, Sam Russell wrote: > > I'm happy with the slice-by-8 code I have < > https://github.com/samrussell/gnulib/blob/slice_by_8/lib/crc.c < > https://github.com/samrussell/gnulib/blob/slice_by_8/lib/crc.c>> but > the cksum_pclmul implementation is quite detailed so it would be useful if > we could relicense that for gnulib. > > Sounds good re slice-by-8. > > Re pclmul in gnulib, I don't want to add stop energy, but it's worth > considering: > In general gnulib focuses on portable routines, so for example leaves > platform specific crypto optimizations to libcrypto, only providing > fallback > cross platform implementations where needed. > In coreutils we needed to build the pclmul code as a separate library > so that with autotools it can be portably built with separate -mavx etc. > flags. > There are both build time and runtime guards around the pclmul code. > > BTW I tested pclmul as about twice as fast as slice-by-8 (on an i3-2310M). > > cheers, > Pádraig. >