95 ms·
MIR is here! End-users probably aren't going to be too excited about this just yet, since MIR's focus in 1.12 is in ensuring there are no correctness regression
by kibwen 10y ago
MIR is here! End-users probably aren't going to be too excited about this just yet, since MIR's focus in 1.12 is in ensuring there are no correctness regressions (always a risk when you rewrite an enormous portion of your middle-end) or noticeable runtime perf or compile-time perf regressions. I do recall pcwalton remarking that MIR improved Servo's compile times by about 20%, though this is probably not what one would expect across the board. In any case, the upcoming 1.13 release is where the rubber is really going to start meeting the road: middle-end optimizations that operate on the MIR (i.e. https://github.com/rust-lang/rust/pull/36388 https://github.com/rust-lang/rust/pull/36388 ); outright removing old trans (which remains in 1.12 via a compiler flag) which allows us to actually start taking advantage of non-zeroing drop (a long-held dream!); an initial spike for incremental recompilation; plus big miscellaneous performance improvements such as https://github.com/rust-lang/rust/pull/36524 https://github.com/rust-lang/rust/pull/36524 . As ever, no matter how exciting Rust's present is, it somehow seems that its future is even more so. :P
(Which isn't to overshadow Jonathan Turner's heroic compiler error message overhaul that has been long in the works, or the dozens and dozens of new volunteers who answered the call to help us transition: https://github.com/rust-lang/rust/issues/35233 https://github.com/rust-lang/rust/issues/35233 . But I've had the new error messages enabled for months now, and it's easy to forget that not everyone has been enjoying them this whole time!)
- cschmidt 10y agoFor those like me that don't know, MIR is midlevel intermediate representation https://blog.rust-lang.org/2016/04/19/MIR.html https://blog.rust-lang.org/2016/04/19/MIR.html
- libria 10y agoWhich will enable in the future: > Faster compilation time [...] Faster execution time [...] More precise type checking
- pc2g4d 10y agoI'm also excited about the possibilities MIR opens up. As I recall, non-lexical lifetimes depended on MIR. Does anybody know what the current ETA is for that feature?
- untothebreach 10y agoThere is a postponed issue regarding them here: https://github.com/rust-lang/rfcs/issues/811 https://github.com/rust-lang/rfcs/issues/811 (Edited after @steveklabnik corrected me)
- steveklabnik 10y agoNit: that's not an RFC, it's just an issue in the RFC repo. PRs in that repo are a much bigger deal than issues: issues are a place to talk in a general sense and see if others are interested in the feature, but converting that into an actual, actionable RFC is a lot of work. I'm not aware of any actual RFC for non-lexical lifetimes, because everyone who would do such a thing knew we had to wait for MIR to shake out before they were realistically possible, and so writing an RFC before then would mostly be a waste of time.
- untothebreach 10y agoAh, you're right, sorry. Corrected.
- steveklabnik 10y agoIt's all good! I only even make the nitpick because this is an _incredibly_ anticipated feature, and I don't want people to have unrealistic expectations about how far along it is. I considered not even saying anything.
- steveklabnik 10y agoIt's still in the pre-RFC phase, so there's no solid ETA. This was in fact one of the largest blockers, though, so we'll see how it goes. To make the status of MIR more clear: * 1.11: "old trans" by default, MIR with a flag * 1.12: MIR by default, "old trans" with a flag * 1.13: MIR only, "old trans" is gone Given that we've had 6 weeks so far with MIR-by-default, everything is looking good, but in theory, making it more widely available might turn up issues. If something catastrophic happens, in theory, old trans could be brought back. So we'll see how the next few weeks goes. That doesn't mean _no_ work has been done on non-lexical lifetimes, see http://smallcultfollowing.com/babysteps/blog/2016/05/09/non-lexical-lifetimes-adding-the-outlives-relation/ http://smallcultfollowing.com/babysteps/blog/2016/05/09/non-... (that's a link to the last of three posts). But there's still work to write an actual RFC, discuss it, and then land it.
- EugeneOZ 10y agoeach percent of compilation time is an improvement. 20% is huge success.
- deleted 10y ago[deleted]
- SkyMarshal 10y agoMaybe off topic, but what's the state of constant-time programming in Rust? Last I checked it wasn't possible and people who need that still have to stick with C or other languages.