3 ms·
This sounds like it is written by a person with little experience with compilers. The reason you compile to SSA is because it's easy to perform optimizations on
by webkike 10y ago
This sounds like it is written by a person with little experience with compilers. The reason you compile to SSA is because it's easy to perform optimizations on. At some point you compile Rust to LLVM.
- wcrichton 10y agoYes, and Rust does the hard work of turning your code into SSA and activating all those optimizations. Why should we have to recreate all the effort of the Rust compiler devs? And please refrain from ad hominem. It adds little to the conversation.
- webkike 10y agoAs others have pointed out, the difference is a sacrifice in compilation time to more quickly implement a langauge very semantically similar to rust. If it's not super similar to rust, you are simply jumping through more hoops than it is worth. Yes, LLVM IR is a pretty decent compilation target. And honestly, having costly abstractions provided to you would probably encourage you to generate poorer code. But I digress.