I do know about ob_shash, and youre probably right that most strings used by pystone are interned. Even so, my running python/pystone through vtune showed that as much time is spent in string_hash() as lookdict_string(). Lookdict_string() is, of course, called many more times than string_hash() - but the total self time for each function is comparable. Not only does the current hash function use a multiply for every character, but it doesn't parralelise very well. The functions I have been playing with are about 4 times faster than the current function, while using only half the multiplies, adds and loop iterations. > -----Original Message----- > From: Neil Schemenauer [mailto:nas-python@python.ca] > Sent: Wednesday, 25 June 2003 00:27 > To: damien.morton@acm.org > Cc: python-dev@python.org > Subject: Re: [Python-Dev] Python hash function > > > Damien Morton wrote: > > Maddeningly, I havent been able to translate these near-perfect > > distributions into improvements in pystones. > > No time to look at this in deal but do you know about > ob_shash? I suspect most strings used by pystone are interned. > > Neil
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