Populating a dictionary, fast [SOLVED SOLVED]

Aaron Watters aaron.watters at gmail.com
Wed Nov 14 09:43:58 EST 2007


On Nov 12, 12:46 pm, "Michael Bacarella" <m... at gpshopper.com> wrote:
>
> > It takes about 20 seconds for me. It's possible it's related to
> > int/long
> > unification - try using Python 2.5. If you can't switch to 2.5, try
> > using string keys instead of longs.
>
> Yes, this was it.  It ran *very* fast on Python v2.5.

Um.  Is this the take away from this thread?  Longs as dictionary
keys are bad?  Only for older versions of Python?

This could be a problem for people like me who build
lots of structures using seek values, which are longs, as done in
http://nucular.sourceforge.net and http://bplusdotnet.sourceforge.net
and elsewhere.  Someone please summarize.

  -- Aaron Watters
===
http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=white%20trash




More information about the Python-list mailing list