Skip to content

Some opt-level 2 optimizations make rustc a *lot* slower #76433

Closed
@RalfJung

Description

@RalfJung

This Miri testcase, when built via rustc, usually only takes a few seconds. With -Zmir-opt-level=2, however, it takes at least two minutes (then I aborted compilation).

To reproduce, I did this in a Miri checkout (no need to build Miri, we are just using the example):

$ time rustc tests/run-pass/float.rs

real    0m7,099s
user    0m6,219s
sys     0m0,964s
$ time rustc tests/run-pass/float.rs -Zmir-opt-level=2
^C

real    2m12,074s
user    2m10,970s
sys     0m0,985s

Cc @rust-lang/wg-mir-opt

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-mir-optArea: MIR optimizationsI-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