4 ms·
I'm aware. I know how rust works and why people want it. I haven't checked the times, but if the borrow checker is really the slowest part, maybe making rust s
by unsafecast 4y ago
I'm aware. I know how rust works and why people want it.
I haven't checked the times, but if the borrow checker is really the slowest part, maybe making rust skip it is a valid approach for end users. Sounds like an interesting experiment.
- nevi-me 4y agoThere was a PR merged yesterday which should give us 5-10% improvements in compile times [0]. As long as there are people monitoring and working on compile times, one could optimistically hope that as more companies become willing to throw money at Rust, we'll see improvements over time. Regardless of how fast one's machine is, I think having some compile caching infra like sscache should help improve time to compile. [0] https://perf.rust-lang.org/compare.html?start=9be2f35a4c1ed1b04aa4a6945b64763f599259ff&end=1ca6777c014813e3bdb98d155562fc3d111d86dd&stat=instructions:u https://perf.rust-lang.org/compare.html?start=9be2f35a4c1ed1...
- EugeneOZ 4y agoBy “biggest” I meant “giving the biggest impact”. I don't know if it's the slowest part.
- a4a4a4a4 4y ago> but if the borrow checker is really the slowest part, maybe making rust skip it is a valid approach for end users. Relevant username?...
- unsafecast 4y agoI mean, if the people that write the code don't skip it, I don't see the issue. The code in the source tree is supposed to be safe, so you might as well not do borrow checking and whatever other safety stuff you have.
- sebzim4500 4y agoIf you aren't changing the code yourself, then why not download a binary? And if you are changing it, then you probably don't want to turn off the borrow checker.
- Gigachad 4y agoWhy not skip the whole compilation step and just download the precompiled kernel? There is really no point compiling software you didn’t modify and if you did modify it, you want the borrow checker on.
- alpaca128 4y agoThe borrow checker is only one reason for the slow compile times. Cargo provides a separate `check` command to only do code & typechecking and that can be much faster than full compilation. LLVM and the way rustc interacts with it also plays a role. In my experience when compilation takes longer the actual delays are in the last steps, long after the compiler is done checking and printing warnings. On an unrelated note, I also noticed a large amount of static string literals in the code can slow down compilation to a surprising degree.
- pjmlp 4y agoCargo check is hardly usefull when doing graphics coding.
- deleted 4y ago[deleted]