force-net / Crc32.NET

Fast version of Crc32 algorithm for .NET
MIT License
199 stars 52 forks source link

FYI: Unsafe rewrite + Intrinsics #10

Closed buybackoff closed 6 years ago

buybackoff commented 6 years ago

I used your code in my CRC32 implementation and did some benchmarks: https://github.com/Spreads/Spreads/commit/1a6b6c252989bf5071be23366a78429aa6751955

CRC32 Managed in every benchmark is code from this repo rewritten to avoid virtual method calls and works with pointers. The numbers are in MB/sec.

The main point was to use hardware intrinsics and your code is the fastest managed fallback I have found.

Thanks!