Closed
Description
At the time of writing, if $c { $i } else { $e }
builds MIR that is simpler and therefore is ~1-3% better in terms of compile times than match $c { $i } else { $e }
. However, after the early-opt
MIR optimization, they are basically the same.
In #59288 we start desugaring if
expressions to match
and so if we optimize for the special case of two match arms we can potentially improve compiles times.
cc @oli-obk
Metadata
Metadata
Assignees
Labels
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlCategory: An issue proposing an enhancement or a PR with one.`#![feature(let_chains)]`Issue: Problems and improvements with respect to compile times.Relevant to the compiler team, which will review and decide on the PR/issue.