Skip to content

Result<T, E> where size_of::<T>() < 128 and size_of::<E> >= 128 #4652

Closed
@llogiq

Description

@llogiq

Those will cause LLVM to issue memcpy calls to copy them around. Boxing the error type will push them below LLVM's size threshold, thus possibly improving performance, unless the Err case is more likely than the Ok case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.L-perfLint: Belongs in the perf lint group

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions