GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-126703: Add freelists for list and tuple iterators by eendebakpt · Pull Request #128592 · python/cpython

Conversation

@eendebakpt

@eendebakpt eendebakpt commented Jan 7, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

  • Issue: Use freelist for range object, iterator objects and other often used objects #126703

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
eendebakpt added 4 commits January 3, 2025 22:44
@eendebakpt
Add freelists for list and tuple iterators
f180a59
@eendebakpt
add asserts
7afbc35
@eendebakpt
Merge branch 'main' into iterator_freelists
d5c1b1b
@eendebakpt
refactor
77d923d
@eendebakpt
eendebakpt requested a review from ericsnowcurrently as a code owner January 7, 2025 18:35
@bedevere-app bedevere-app Bot mentioned this pull request Jan 7, 2025
Use freelist for range object, iterator objects and other often used objects #126703
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Jan 7, 2025
eendebakpt and others added 4 commits January 7, 2025 19:35
@eendebakpt
Merge branch 'main' into iterator_freelists
720349d
@blurb-it
📜🤖 Added by blurb_it.
a3aed1c
@eendebakpt
Merge branch 'main' into iterator_freelists
efdbad3
@eendebakpt
Merge branch 'main' into iterator_freelists
b2dd84b
@markshannon

markshannon commented Jan 28, 2025

Copy link
Copy Markdown
Member

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

Stats coming up...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eendebakpt

eendebakpt commented Jan 28, 2025

Copy link
Copy Markdown
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)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

markshannon
markshannon approved these changes Jan 29, 2025
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good. Thanks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eendebakpt reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jan 29, 2025
@markshannon
markshannon merged commit 1a80214 into python:main Jan 29, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon markshannon approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@eendebakpt @markshannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.