• Radu Berinde's avatar
    hash/crc32: cleanup code and improve tests · bdde1013
    Radu Berinde authored
    Major reorganization of the crc32 code:
    
     - The arch-specific files now implement a well-defined interface
       (documented in crc32.go). They no longer have the responsibility of
       initializing and falling back to a non-accelerated implementation;
       instead, that happens in the higher level code.
    
     - The non-accelerated algorithms are moved to a separate file with no
       dependencies on other code.
    
     - The "cutoff" optimization for slicing-by-8 is moved inside the
       algorithm itself (as opposed to every callsite).
    
    Tests are significantly improved:
     - direct tests for the non-accelerated algorithms.
     - "cross-check" tests for arch-specific implementations (all archs).
     - tests for misaligned buffers for both IEEE and Castagnoli.
    
    Fixes #16909.
    
    Change-Id: I9b6dd83b7a57cd615eae901c0a6d61c6b8091c74
    Reviewed-on: https://go-review.googlesource.com/27935Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    bdde1013
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...