| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
The counting change seems independent of the callback refactor. clear_weakrefs() already walks the final collectable list without running Python, so returning its size doesn't need the new callback helper or list selection. Let's keep this change seperate if that refactor gets reworked.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
With this optimization the GIL collector counts collectable objects during late weakref cleanup. This removes the separate gc_list_size() walk over the same list.
Performance
Before is #159587 (ff1acf0a); after is this PR at 70bc7962. Both builds use -falign-functions=64.
gc_collect_self_lists collects 1,000,000 one-element lists that refer to themselves.
Benchmarks: python/pyperformance#496