[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public

Conversation

Copy link
Contributor

sir-sigurd commented Aug 1, 2018

Copy link
Contributor

eric-wieser Aug 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does PyTuple_GET_ITEM guarantee its result is an lvalue? That's not in the public API anywhere.

PySequence_Fast_ITEMS(args)[0] would be conforming to the public API, and I think just as fast

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed it, PySequence_Fast_ITEMS() seems to be slower as it checks for type.

sir-sigurd force-pushed the functools-reduce-performance branch from 4a0bca9 to f491abf Compare February 18, 2019 11:56
methane changed the title bpo-34303: Micro-optimizations in functools.reduce(). bpo-34303: Micro-optimizations in functools.reduce() Feb 18, 2019
Copy link
Contributor

@methane, was there any blocker on merging this? Thanks!

Copy link
Member

methane commented May 31, 2019

@methane, was there any blocker on merging this? Thanks!

@rhettinger would you review this?

rhettinger merged commit e5f6207 into python:master Jun 1, 2019
sir-sigurd deleted the functools-reduce-performance branch June 10, 2019 15:00
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants