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.
