Skip to content

Optimize Value<T> #1

@nunoplopes

Description

@nunoplopes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance issues or proposals for reducing overhead

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions