Populating a dictionary, fast [SOLVED]
Francesc Altet
faltet at carabos.com
Wed Nov 14 06:39:52 EST 2007
A Wednesday 14 November 2007, Istvan Albert escrigué:
> 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.
Yes, could be. However, I was well aware that the problem was looking
up one single value, so, mea culpa :(. Sorry for introducing noise.
--
>0,0< Francesc Altet http://www.carabos.com/
V V Cárabos Coop. V. Enjoy Data
"-"
More information about the Python-list
mailing list