As seen here SHA512 is used for file hashing. I wonder why, cryptographic quality of the hash function should be secondary, but instead the focus should be on performance.
I think the benchmark should be to offer similar performance to CCache which apparently uses xxhash.
I assume the choice for SHA512 was made due to implementation simplicity (its already there in the rust eco system) and robustness. Hashing on my laptop (i7-7700HQ CPU @ 2.80GHz) accounts for up to 60% of the same runtime as full compilation, which explains the somewhat bad speed up factor of ~2.3.
Apparently the rust eco system has an implementation for xxhash. Maybe that one could be used as a first step (should be easy to achieve), if one reluctantly wants to start researching the topic of "best hashing functions".
As seen here SHA512 is used for file hashing. I wonder why, cryptographic quality of the hash function should be secondary, but instead the focus should be on performance.
I think the benchmark should be to offer similar performance to CCache which apparently uses xxhash.
I assume the choice for SHA512 was made due to implementation simplicity (its already there in the rust eco system) and robustness. Hashing on my laptop (i7-7700HQ CPU @ 2.80GHz) accounts for up to 60% of the same runtime as full compilation, which explains the somewhat bad speed up factor of ~2.3.
Apparently the rust eco system has an implementation for xxhash. Maybe that one could be used as a first step (should be easy to achieve), if one reluctantly wants to start researching the topic of "best hashing functions".