Re:Zig 0.4.0 Released
by AndyKelley on Tuesday April 09, 2019 @12:22AM
(#19611771)
I didn't put a lot of consideration into the algorithm in particular. I was going to do SHA-256 but somebody told me Blake was faster.
I haven't tested the performance of any other algorithms, but that's a completely swappable component. I'm sure the hash function will be swapped with a different one before 1.0.0 is done.
As an example, xxHash [1] would probably get you an easy 5-10x performance improvement over Blake2b. So there are some easy improvements if the cryptographic requirement is not needed.
Why this algo in particular? Is this a security feature? I suppose wrt "Reflections On Trusting Trust" it may be. But if it didn't need to be secure it could probably be a lot faster (assuming this is a critical path for cache hits).