-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Description
Per the Perceus precise reference counting paper:
- object liveliness can be tracked precisely: last use in a scope causes deref and possible deallocation, instead of waiting for the scope to be exited
- the object being deref'd more likely to be in the caches, so the cost of reference counter update and object traversal is lower
- deallocation is expected then to be faster, and the memory use is lower too since fewer temporary objects dwell around
I haven't checked, but I imagine that Python currently derefs locals when the scope is exited, and not at the point of last reference in the scope.
Is timely deallocation an idea that was raised before - and if not, would that be something worth doing? I presume a proof-of-concept with some reasonable benchmark indicators of improvement would be in order first.
Metadata
Metadata
Assignees
Labels
No labels