Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
RalfJung opened this issue Sep 7, 2020 · 2 comments
Closed

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

RalfJung opened this issue Sep 7, 2020 · 2 comments
Labels
A-mir-opt Area: MIR optimizations I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@RalfJung
Copy link
Member

RalfJung commented Sep 7, 2020

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

@oli-obk oli-obk added A-mir-opt Area: MIR optimizations I-slow Issue: Problems and improvements with respect to performance of generated code. labels Sep 7, 2020
@tmiasko
Copy link
Contributor

tmiasko commented Sep 7, 2020

Copy propagation takes most of time here; tracked in #36673. Is this the same source as in #73717?

@RalfJung
Copy link
Member Author

RalfJung commented Sep 7, 2020

oops it is... I thought I had reported this before but couldn't find it.^^ Sorry.

@RalfJung RalfJung closed this as completed Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

3 participants