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/2001-May/014905.html below:

[Python-Dev] PyBench DictCreation (was Re: Performance compares)

[Python-Dev] PyBench DictCreation (was Re: Performance compares) [Python-Dev] PyBench DictCreation (was Re: Performance compares)Neil Schemenauer nas@python.ca
Fri, 18 May 2001 11:15:59 -0700
Guido van Rossum wrote:
> What's an association table?

A table of keys and values.  Values are looked up by looping over
the table comparing each key until the correct one is found (ie.
its O(n) where n is the size of the table).  For Python, the cost
of doing compares probably outweighs the cost of doing the
hashing, even for small tables.

Its not clear to me though if it would be a win.  Assuming that
interned strings are the most common key, a assocation table with
four entries would take on average two pointer compares to look
up a value.

  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