-
Notifications
You must be signed in to change notification settings - Fork 5
Optimize Value<T> #1
Copy link
Copy link
Open
Labels
performancePerformance issues or proposals for reducing overheadPerformance issues or proposals for reducing overhead
Metadata
Metadata
Assignees
Labels
performancePerformance issues or proposals for reducing overheadPerformance issues or proposals for reducing overhead
Type
Fields
Give feedbackNo fields configured for issues without a type.
Our Rc always has strong count of 0 or 1 + potentially weak references.
We should try hand rolling a dedicated type that reduces overhead. We only need 1 bit for checking if the object is alive or not (steal it from the weak counter). Plus a single allocation.
Check https://doc.rust-lang.org/std/rc/struct.UniqueRc.html