A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-April/044235.html below:

[Python-Dev] String hash function multiplier

[Python-Dev] String hash function multiplier [Python-Dev] String hash function multiplierRaymond Hettinger raymond.hettinger at verizon.net
Tue Apr 13 19:59:53 EDT 2004
Does anyone have any issues with changing the hash multiplier for the
string and Unicode hash functions?

Instead of 1000003, I would like to use Aho's 65599, a prime near 2**16
that is efficiently expressible as (x << 6) + (x << 16) - x.   This
replaces a multiply with fast adds and shifts (with the two shifts
potentially being executed in parallel).  

Googling for "hash 65599" shows a long history of widespread use and
testing without any problems.


Raymond Hettinger



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4