Hacker News new | past | comments | ask | show | jobs | submit login

Having the ability to turn off expensive compiler options is nice. For Solvespace (C++), turning on LTO make compilation about 6x longer for maybe 15 percent runtime performance. I do development without LTO and let releases get LTO. The borrow checker in Rust might be to important to turn off even sometimes.



> The borrow checker in Rust might be to important to turn off even sometimes.

Variations of this point come up often, that the main reason rust compile time is slow is typechecking or borrowchecking, but that’s not true, while those operations are expensive, it’s monomorphization (and llvm) that are the main drivers of compile time currently. Building a compiler on top of llvm is unfortunately going to be sluggish for feedback loops , regardless of your type system.

Also, unlike LTO, borrow checking is not just an optimization, turning it off would be like allowing you to add arrays and booleans together: meaningless and wrong. Anyways, you wouldn’t save more than ~10% time.

Apart from the rant above, I do agree that having the ability to tune optimization levels for development vs prod is good, I would like it if it were easier to do stuff like PGO or other stupidly expensive optimizations for releases.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: