Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Switch to slicing-by-8 CRC32 algorithm #37
This PR replaces the single look-up-table CRC32 implementation with the slicing-by-8 algorithm. The new algorithm is approximately 5 times faster than single table lookup CRC.
This improves Ogg FLAC encoding speed by about 5% and decoding by 10%. Other codecs benefit too. Opus decoding is roughly 1%, Vorbis decoding about 2% faster. Pure muxing of already encoded material will probably benefit the most, but I did not test this.
Switching to a slicing algorithm was proposed before by Rodney Brown, but the discussion came to nothing after raising questions about the patent situation. I did a patent search and found the last of the relevant patents on this algorithm having expired in December 2017.
It would be great to see this added to the official Ogg source.
Great! Thanks for having a look at it!