[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5dbf3d932a59 by Serhiy Storchaka in branch 'default': Issue #24276: Fixed optimization of property descriptor getter. https://hg.python.org/cpython/rev/5dbf3d932a59 -- ___ Python tracker

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, it was incorrect microbenchmark. Correct is: $ ./python -m timeit -r 11 -s "from collections import namedtuple as n;a = n('n', 'a b c')(1, 2, 3)" -- "a.a" 3.4 : 100 loops, best of 11: 0.601 usec per loop 3.5 unpatched: 100 loops, best

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: LGTM, go ahead and apply. -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bug

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Affect on performance: $ ./python -m timeit -r 11 -s "from collections import namedtuple as n;a = n('n', 'a b c')(1, 2, 3)" Unpatched: 1000 loops, best of 11: 0.0567 usec per loop Patched : 1000 loops, best of 11: 0.0567 usec per loop -- _

[issue24276] Correct reuse argument tuple in property descriptor

2015-05-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Property descriptor getter uses cached tuple for args (issue23910). This can cause problems when called function use args after reading other property or save args. For now I know only one example - clru_cache_3.patch in issue14373. Proposed patch use cach