Integer and String Dictionary Keys for Fast Access
Lance
lbrannma at cablespeed.com
Thu Oct 3 19:18:44 EDT 2002
Hi,
I'd like each element of a dictionary to have two keys, one a string and the
other an integer. Each of course would be unique relative to the other keys
and associated with a single dictionary value.
The advantage is that key lookups by integer are no doubt much faster than
by strings. At least that's what I find with GAUSS, a matrix programming
language. GAUSS let's users refer to a dictionary value by its string key or
integer key. Referring to the value by its integer key significantly speeds
execution in optimization routines.
Any suggestions?
Thanks in advance.
Lance
More information about the Python-list
mailing list