FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add GC benchmarks and Python implementation filtering by mfalco-oai · Pull Request #496 · python/pyperformance · GitHub

Repository navigation

Add GC benchmarks and Python implementation filtering - #496

Draft
mfalco-oai wants to merge 2 commits into
python:mainfrom
mfalco-oai:mfalco-oai/gh-159437-gc-benchmarks
Draft

mfalco-oai wants to merge 2 commits into
python:mainfrom
mfalco-oai:mfalco-oai/gh-159437-gc-benchmarks

Conversation

mfalco-oai commented Oct 22, 2026 •
edited
Loading

Copy link
Copy Markdown

This adds seven benchmarks for GC paths that are not well covered by the existing suite:

  • gc_collect_large uses 10,000 independent cycles, while gc_collect_self_lists uses a minimal synthetic graph to expose per-object collection overhead.
  • gc_weakref_recheck, gc_resurrection_partial, and gc_resurrection_full cover rechecks after a weakref callback, partial resurrection, and full resurrection.
  • btree_gc_only_frozen covers full collection with a frozen startup heap.
  • gc_tuple_survivors times collection of fresh retained tuples containing only None.

The new python_implementations metadata lets benchmarks declare which Python implementations they support. Selection checks the version and implementation of the target interpreter. Benchmarks that do not support the target implementation are reported and skipped. The frozen and resurrection cases are CPython-only; the large-collection and tuple cases also support PyPy.

Related to python/cpython#159437.

Copy link
Copy Markdown
Author

@pablogsal

Copy link
Copy Markdown
Author

@brandtbucher

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL