Skip to content

The %(rem) operation seems to cause unexpected overhead. #650

@823984418

Description

@823984418

During a performance investigation of spsc, I discovered an unexpectedly high number of __aeabi_uidivmod calls, most of which originate from QueueInner::increment and QueueInner::len. These modulo operations occur because, after split, the internal storage uses slice types, preventing the compiler from propagating length information and optimizing away the division operations. I believe these modulo operations are unnecessary, and if possible, I would like to request that the maintainers optimize this part of the implementation.

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