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
Performance regression in 2.5 #45386
Comments
The attached program uncovers a two-fold performance regression in $ python2.5 periodic_test.py
elwise 3.91989398003
collective 1.21577095985
$ python2.4 periodic_test.py
elwise 2.50014710426
tuplewise 1.35589385033 |
I've narrowed the problem to the usage of generator expressions.
It appears to be a fixed cost, or startup cost, of the generator |
May this be a byproduct of the new generator features in 2.5? |
The slowdown is due to the new function _PyObject_LengthHint: on my Should we disable this function for some known built-in types? |
I'll take a look at it next week -- want to think through the various |
FWIW, the 2.4 to 2.5 timing difference came from renaming __len__ to For the most part, I don't care about the overhead as it is constant. |
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: