diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-05-14 11:57:48 +0200 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-05-14 11:57:48 +0200 |
| commit | 25ca82aa17bb01927bb66a31ec817b0f39509c4d (patch) | |
| tree | 1cc1162f64b276dba98e41504389e72f1365c27e /src/libsyntax/errors/json.rs | |
| parent | f5462013ee8cbf6c5bf82d1e089de6512d1f52cb (diff) | |
| parent | 49b2cdf47c983d5ea8a576346d08120f0e3af30a (diff) | |
| download | rust-25ca82aa17bb01927bb66a31ec817b0f39509c4d.tar.gz rust-25ca82aa17bb01927bb66a31ec817b0f39509c4d.zip | |
Rollup merge of #33566 - dotdash:biased_switch, r=nagisa
[MIR trans] Optimize trans for biased switches Currently, all switches in MIR are exhausitive, meaning that we can have a lot of arms that all go to the same basic block, the extreme case being an if-let expression which results in just 2 possible cases, be might end up with hundreds of arms for large enums. To improve this situation and give LLVM less code to chew on, we can detect whether there's a pre-dominant target basic block in a switch and then promote this to be the default target, not translating the corresponding arms at all. In combination with #33544 this makes unoptimized MIR trans of nickel.rs as fast as using old trans and greatly improves the times for optimized builds, which are only 30-40% slower instead of ~300%. cc #33111
Diffstat (limited to 'src/libsyntax/errors/json.rs')
0 files changed, 0 insertions, 0 deletions
