| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Closing this PR. I’ve learned that @brandtbucher's mentee has been working on something very close to this for a while and was planning to open source it once a few things cleared up. Rather than duplicate that effort, I’d prefer to focus on their work and help get it upstream, so I’ll be following up on that instead :) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The collector walks the generation once in update_refs() to copy every reference count into the GC header, and again in subtract_refs() to subtract the references between the collected objects. In a full collection every tracked object is in the list, so the second walk needs nothing from the first, and this does both in one walk. An object that is decremented before the walk reaches it still holds its _gc_prev pointer, and the walk recovers the decrements from the difference with the pointer it knows was there.
Benchmarks
CPU time spent in the collector, taken in gc.callbacks. Six runs per executable in baseline/candidate/candidate/baseline order; medians of the runs taken while the machine was quiet.