Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A library should absolutely not be using a cryptographic hash for something like a hash table unless they have very particular requirements. You don't want to force a significant performance penalty on all your users when there are good general-purpose hashes like XXH3 out there.


Counterpoint: SipHash.

Also, in general I disagree. For most people, safe defaults like hash tables with safe hashes and CSPRNG for random numbers are fast enough. And they have the important property of keeping people from shootings themselves in the feet.

People who have more stringent perf requirements will know and shouldn’t have a problem choosing a different implementation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: