Skip to content

Make this fast #9

Open
Open
@matklad

Description

@matklad

count me is extreeeemly slow under contention. This is expected, becaues the current imple is roughly loop { be_slow() }.

We should make it faster.

I see two approaches:

Use therad-local hash maps, which are registered with a global map on thread creation (Arc/Weak). I think this is possible with the current API. Must not regress single thread perf though!

Back each variable by atomic relaxed counter. This I think would need an FastCount type and fast_count! macro.

See also https://arxiv.org/abs/1701.00854

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions