-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct reuse argument tuple in property descriptor #68464
Comments
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: 10000000 loops, best of 11: 0.0567 usec per loop |
LGTM, go ahead and apply. |
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 : 1000000 loops, best of 11: 0.601 usec per loop
3.5 unpatched: 1000000 loops, best of 11: 0.445 usec per loop
3.5 patched : 1000000 loops, best of 11: 0.454 usec per loop There is small slowdown (2%), but it is only small part of the gain of the optimization. |
New changeset 5dbf3d932a59 by Serhiy Storchaka in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: