[Python-Dev] About dictionary lookup caching

Raymond Hettinger python at rcn.com
Tue Dec 19 23:09:04 CET 2006


[Andrea Griffini]
> I'm experimenting with a patch for dictionary lookup caching, the
> main idea being avoiding the lookup of a constant (co_names) in
> a dictionary if the dictionary didn't change since last lookup.
. . .
> My opinion is that it would be by far better to do this ordering
> of co_names at compile time

It would be nice if you could avoid introducing a new invariant that would be 
have to be maintained by other code generation tools or bytecode hacks.


Raymond 



More information about the Python-Dev mailing list