Skip to content

rustc should output a loop in the IR for initializing arrays #5491

Closed
@thestinger

Description

@thestinger

At the moment [1, ..256] creates 2 * 256 instructions. LLVM will optimize it back to a loop or a memset, but it would better to start with that in the first place and rely on the unrolling heuristics for small loops (which may or not be enabled right now).

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions