Skip to content

nonzero! macro is not (yet) zero cost #20

@rukai

Description

@rukai

Looking at the output of cargo asm on my application I can see function calls being generated from the nonzero macro
image

We could possibly add an #[inline(always)] but I dont think that will necessarily be enough, there might be more logic included.
To ensure it is actually zero cost we will need to make the macro generate code within a const context via rust-lang/rust#76001 once that is stabilized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions