On Sat, Dec 18, 2021 at 1:44 AM Hao Hu <hao.hu...@gmail.com> wrote: > > For that sort of thing, it may be more practical to use your own > > hashing function, possibly a cryptographically secure one. The precise > > hashing function used by Python isn't guaranteed, so if you need it to > > be stable across different runs, and especially if you need to seed it > > in a specific way, I'd recommend hashlib: > > > > https://docs.python.org/3/library/hashlib.html > > I’ve explored that option, however the siphash24 or fnv under the hood of > *hash* seems to be more adapted for this type of use cases in terms of > *performance*. > Otherwise, would that be useful to add siphash24 or fnv in the hashlib as > well?
That's a more viable option, although maybe it wouldn't even matter. How does hashlib.sha1() performance stack up, and what about a handrolled simple string hashing function in Python? Is performance actually going to be a problem with one of those? ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/LKXP3P7J7RBHC57SVS4VASDTVACIEM5S/ Code of Conduct: http://python.org/psf/codeofconduct/