[issue1700288] Armin's method cache optimization updated for Python 2.6

2009-01-15 Thread Collin Winter
Collin Winter added the comment: Looks like this was re-applied in r59943 and r59944. Thanks for taking care of this, Amaury. -- nosy: +collinwinter, jyasskin resolution: accepted -> fixed status: open -> closed ___ Python tracker

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-10-13 Thread Jesús Cea Avión
Changes by Jesús Cea Avión <[EMAIL PROTECTED]>: -- nosy: +jcea ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailin

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-07-10 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: rhettinger -> ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-b

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-01-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: For the record: It is very wrong to call self->ob_type->tp_base's slot: slots are often copied from their base class, and you get infinite recursion. Calling StructType.tp_base->tp_setattro is much better. _ Tracker <[EM

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-01-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: OK, I apply first my 2 lines, then the original patch. _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-01-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nice analysis. Please apply. _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing list Unsubscr

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-01-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: After some debug work, I found an explanation: - The attribute "name" is the name of a type slot. So it becomes cached during the type construction. - in function ctypes/_ctypes.c::StructUnionType_new(), the type's __dict__ is replaced by a "stgdict". - thi

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-01-13 Thread Kevin Jacobs
Kevin Jacobs added the comment: Couldn't resist looking into this more and I must admit that I am a bit stumped. If instead of returning a value from the cache fast path in _PyType_Lookup, I modified the code to store the value and assert that it matches with the non-cached result from traversin

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-01-13 Thread Kevin Jacobs
Kevin Jacobs added the comment: All tests passed when I first ported Armin's patch to 2.6. I'll have a chance to look into this later in the week. If anyone gets to it first, please summarize your findings here to avoid duplication of effort. _ Tracker <[EMA

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-01-13 Thread Georg Brandl
Georg Brandl added the comment: Backed out again in r59940 -- test_ctypes fails in test_incomplete.py. Armin reports that with his original patch on 2.4, this test passes. _ Tracker <[EMAIL PROTECTED]> ___

[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-01-12 Thread Georg Brandl
Georg Brandl added the comment: Committed to trunk as r59931. Leaving open if you want to make more adjustments, Raymond. -- nosy: +georg.brandl _ Tracker <[EMAIL PROTECTED]> _

[issue1700288] Armin's method cache optimization updated for Python 2.6

2007-12-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Okay, this patch is accepted. We'll likely do additional tweaks after it goes in. Please close the other tracker items for this same issue. If no one applies this, I'll do it when I return from the holidays. -- resolution: -> accepted ___

[issue1700288] Armin's method cache optimization updated for Python 2.6

2007-12-06 Thread Neil Toronto
Neil Toronto added the comment: Attribute access that happens only once or very infrequently probably shouldn't go through the cache machinery - it'll only slow things down. (Updating slots for example.) Maybe _PyType_Lookup should remain the same, with _PyType_CachingLookup added for attribute a

[issue1700288] Armin's method cache optimization updated for Python 2.6

2007-12-06 Thread Neil Toronto
Neil Toronto added the comment: I've attached the microbenchmarks I was using for my own version of attribute caching. For list, tuple, dict, and a deep hierarchy, it tests accessing type attributes (cls.__class__), class attributes (cls.__init__), class attributes via instance (inst.__class__),