Re: [Python-Dev] About dictionary lookup caching

2006-12-19 Thread Martin v. Löwis
Raymond Hettinger schrieb: > If you can find some other design that doesn't depend on the ordering of > co_names, that would be nice; otherwise, we're adding a permanent > complication to the compiler and establishing a new invariant that would > have to be maintained by everyone hoping to generate

Re: [Python-Dev] About dictionary lookup caching

2006-12-19 Thread Raymond Hettinger
[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_

Re: [Python-Dev] About dictionary lookup caching

2006-12-19 Thread Martin v. Löwis
Andrea Griffini schrieb: > My opinion is that it would be by far better to do this ordering > of co_names at compile time but I've no idea where to look > for trying to make such a change. > > Can someone please point me in the right direction ? It's all in Python/compiler.c. The names list is cr

Re: [Python-Dev] About dictionary lookup caching

2006-12-19 Thread Brett Cannon
On 12/19/06, Andrea Griffini <[EMAIL PROTECTED]> wrote: 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. Currently the cache is held in a structure th

[Python-Dev] About dictionary lookup caching

2006-12-19 Thread 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. Currently the cache is held in a structure that is parallel to co_names (the LOAD_GLOBAL opcode uses opa