On May 25, 2008, at 12:55 AM, Lisandro Dalcin wrote: > On 5/25/08, Robert Bradshaw <[EMAIL PROTECTED]> > I'm not > sure what the method cache for 2.6/3.0 is, is there a good >> reference explaining this? It would seem, however, that you have a >> good point. > > Well, I do not know any reference to give you, but I realized all this > just by following the actuall code ;-) ... is a very nice hackery, it > will speedup a log methods calls like this: > > L = [] > for i in iterable: > L.append(i) > > The actual method is 'cached' internally in a sort of statically sized > (about 1000 entries) hashtable, so you can save dict lookups, and this > is specially important in the case of inheritance...
I'm not quite sure I follow. Where is the cache (is it global, or attached to L, or to the class of L?) What if you write "L.append = len" inside the loop? - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
