github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/dbnode/digest/README.md (about) 1 # digest 2 3 This package consolidates all our digest algorithms used for data integrity into a single place. Adler32 is used and dependendent on the use case we rely on the standard library or a modified rolling hash version that can be stack allocated. 4 5 For highly concurrent callsites that require digests, they use the stack based adler32 library to avoid having to pool digest structs. The stack based adler32 library is a few percent slower than the standard library adler32 algorithm but heap allocation free. 6 7 For less concurrent callsites or callsites already under a mutex a cached digest struct can be kept and reused, these callsites use the standard library methods. 8 9 For callsites that do not need to incremental checksumming, meaning they only need to checksum a single byte slice, the static checksum method from the standard library is used.