]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-129201: Use prefetch in GC mark alive phase. (gh-129203)
authorNeil Schemenauer <nas-github@arctrix.com>
Wed, 5 Feb 2025 19:38:30 +0000 (11:38 -0800)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2025 19:38:30 +0000 (11:38 -0800)
commitcdcacec79f7a216c3c988baa4dc31ce4e76c97ac
tree43aeae78e47e7fd96d657c58e45088e2a3975f43
parent5fb019fc29a90e722aff20a9522bf588351358cd
gh-129201: Use prefetch in GC mark alive phase. (gh-129203)

For the free-threaded version of the cyclic GC, restructure the "mark alive" phase to use software prefetch instructions.  This gives a speedup in most cases when the number of objects is large enough.  The prefetching is enabled conditionally based on the number of long-lived objects the GC finds.
Misc/NEWS.d/next/Core_and_Builtins/2025-01-22-14-22-34.gh-issue-129201.wiZzEb.rst [new file with mode: 0644]
Python/gc_free_threading.c