-
Notifications
You must be signed in to change notification settings - Fork 52
Optimize garbage collection #80
Copy link
Copy link
Open
Labels
discussionLooking for input / ideas on this issueLooking for input / ideas on this issueenhancementNew feature or requestNew feature or requestperformanceThis issue targets performance improvementsThis issue targets performance improvements
Description
In the discussion about performance improvements (#50), a point that arose repeatedly is the impact of the crossbeam_epoch-based garbage collection we use to track map entries (nodes and values).
There are several angles from which we might look at reducing this impact. This issue is meant to be for discussion and changes around how and when our code interacts with garbage collection. Ideas floated in #72 (review) and previous comments may serve as a starting point. They include:
- moving direct interactions with
crossbeam_epoch, e.g. in the form ofdefer_destroy, out of critical sections in favour of a simpler collection mechanism for things to be deleted. The collected entities could then be handed of to garbage collection after dropping the lock for the critical section.
It is yet unclear whether this would yield a significant improvement over callingdefer_destroydirectly from within the critical section (as happens currently), as crossbeam essentially also stores a closure for the drop and takes some measures to optimize the storage of these closures (for example, a deferred closure only requires a heap allocation if it exceeds a certain size). - optimizing
defer_destroyand its usage itself. See again Implement TreeBins #72 (review)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
discussionLooking for input / ideas on this issueLooking for input / ideas on this issueenhancementNew feature or requestNew feature or requestperformanceThis issue targets performance improvementsThis issue targets performance improvements