Skip to content
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

gh-126703: Add freelists for list and tuple iterators #128592

Merged
merged 8 commits into from
Jan 29, 2025

Conversation

eendebakpt
Copy link
Contributor

@eendebakpt eendebakpt commented Jan 7, 2025

See the corresponding issue for allocation statistics and see #128368 for more discussion.

@markshannon
Copy link
Member

Benchmarks show a 0.7% speedup, with no obvious pattern. This could be noise or a real speedup.

Stats coming up...

@eendebakpt
Copy link
Contributor Author

The stats are there: https://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20250127-3.14.0a4%2B-b2dd84b/bm-20250127-azure-x86_64-eendebakpt-iterator_freelists-3.14.0a4%2B-b2dd84b-pystats-vs-base.md

If I interpret correctly, we have 16% less allocations and 10% more objects from the freelist.

The performance increase of 0.7% is roughly in line with the 0.2% increase from (#128692) if I look at the number of allocations avoided (see #126703 (comment), about 348M allocations for this PR, 165 PR for the other PR). (within noise of the benchmarks)

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks.

@markshannon markshannon merged commit 1a80214 into python:main Jan 29, 2025
45 checks passed
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.

2 participants