Skip to content

Some atomic operations could be made faster by not calling into C #13403

@OlivierNicole

Description

@OlivierNicole

Some atomic operations are compiled to C calls when they could be compiled to one or two instructions, which would be both shorter and faster than a C call. This is the case of Atomic.fetch_and_add, Atomic.incr , and Atomic.decr, but also, as pointed out by @polytypic in a discussion, Atomic.compare_and_set, Atomic.exchange and Atomic.set, when the operand is integer-like.

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