Runtime: System.IO.Compression.Crc32Helper should use Crc32 intrinsics

Created on 2 Aug 2020  路  3Comments  路  Source: dotnet/runtime

Rather than interoping to zlib when the Crc32 intrinsics are available on Arm and x86/x64

https://github.com/dotnet/runtime/blob/995224db011f77eb095279122244704ccca01d5f/src/libraries/System.IO.Compression/src/System/IO/Compression/Crc32Helper.ZLib.cs#L11-L26

/cc @tannergooding

area-System.IO.Compression tenet-performance

Most helpful comment

All 3 comments

According to https://github.com/dotnet/runtime/issues/2036, the intrinsics use different polynomials. If I understand right, zlib uses 0x04C11DB7/0xEDB88320 and SSE uses 0x1EDC6F41. Wikipedia has a large table.

Is that right?

Sigh might be; I think you might have to use PCLMULQDQ instead

Was this page helpful?
0 / 5 - 0 ratings