[wxPython-users] localization, is it slow ?

Frank Niessink frank at niessink.com
Sun Dec 2 04:53:17 PST 2007


Hi Stef,

2007/12/2, Stef Mientki <s.mientki at ru.nl>:
> Although I don't know anything of the inside of Python,
> I can't image that a lookup of a 800 character string in a dictionary is
> fast,
> but maybe I'm missing some essential insight.

Actually, Python dictionaries are *very* fast. See attached script.
Looking up values in a dictionary of 10000 strings, with keys and
values that have a random length between 3 and 1000 characters, takes
0.3 microseconds per lookup on my computer. (I hope I did the math
right ;-)

Cheers, Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 641 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20071=
202/e33702b7/test.py


More information about the wxpython-users mailing list