Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The way Rust works today is that you compile a whole crate together (all the files). The side effect of that is that the compiler can optimize the whole create vs what's in one file. You get an effect that analogous to LTO (like in C/C++). Conversely, if you now go to incremental builds the opportunity for LTO style optimizations. Thus you end up with a worse runtime performance in incremental compilation.

Caveats and fine details missing all over the place. More focused on the general point.



> Thus you end up with a worse runtime performance in incremental compilation.

Are you sure about this (in the current implementation)?


The article it self says "[...] This is because incremental compilation splits the code into smaller optimization units than a regular compilation session, resulting in less time optimizing, but also in less efficient runtime code."


Thanks, you're right. I missed that.




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

Search: