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

> Much simpler type system, which compiles fast and makes the incremental compilation less concern for them.

Where is this "complex type system -> long compilation times" meme comes from?

Most of rustc's time is spent in llvm. And bottlenecks are identified as monomorphization, producing large amount of LLVM IR and lack of binary dependencies.

Type checking is a small portion of time, and not a bottleneck, IIRC.



You are absolutely true for the release build (sharing the same backend, Zig is also significantly slower in the release build). For the debug build however there may be multiple answers: typing, borrow checking (broadly this is a sort of typing), codegen and LLVM all can contribute significantly to the compilation time [1]. The situation may have been improved since the last time I've checked though.

[1] https://wiki.alopex.li/WhereRustcSpendsItsTime (2019)


Didn't know this. Thanks.




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

Search: