Populating a dictionary, fast [SOLVED]

Istvan Albert istvan.albert at gmail.com
Wed Nov 14 03:34:41 CET 2007

On Nov 13, 11:27 am, Francesc Altet <fal... at carabos.com> wrote:

> Another possibility is using an indexed column in a table in a DB.
> Lookups there should be much faster than using a dictionary as well.

I would agree with others who state that for a simple key based lookup
nothing beats a dictionary.

But knowing that you are one of the authors of the excellent pytables
module I think you are approaching this problem from the perspective
of reading in a large number of values on each access. In those cases
specialized libraries (like the hdf) can directly load into memory
huge amounts of continuous data at speeds that substantially
outperform all other approaches.


More information about the Python-list mailing list