Python Forum
Modern Dictionaries by Raymond Hettinger
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modern Dictionaries by Raymond Hettinger
#3
Watched the video and found it quite interesting and enjoyable.

in 1992, the hash table that I created to process daily calls (normally about 80 million) was kept
separate from data (which was in a flat file), This is the same in RH's algorithm.

One thing that I did differently, which showed significant improvement at the time (by reduction
of collisions) was to make the (hash) table always be a length that was a prime number. In addition,
that size would be based on the size of the data (which changed daily, but in my case was always
known before indexing).

The method of using the cell number (in the hash table) matching the data is a major change, and a
brilliant one.

The algorithm that I wrote allowed for collisions but never had very large chains. Instead of increasing
the size of the table entries vertically, it was done laterally as linked lists. This totally avoided ever
having to reallocate memory and move cell contents. It also removed the necessity of looking
for a place to put the new hash code when a collision was encountered. Simply put it at the end of a
lateral chain.

It was extremely fast for it's day, and I dare say that our processing time was significantly better than
our nearest competitor (at the time)  MCI. The company I am talking about is still around (Now called
CenturyLink) was LCI.


I still use this method when writing 'C' code when large data is involved.

We old men did a few things right!
Reply


Messages In This Thread
RE: Modern Dictionaries by Raymond Hettinger - by Larz60+ - Dec-16-2016, 10:35 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020