5 ms·
For those not in the know, cranelift is primarily used as a wasm compiler backend, but there is also work being done on integrating it into the rust compiler.
by nynx 6y ago
For those not in the know, cranelift is primarily used as a wasm compiler backend, but there is also work being done on integrating it into the rust compiler.
- gameswithgo 6y agosome are hopeful it will provide a faster debug compile option, and/or just a non llvm dependent option
- ComputerGuru 6y agoIndeed - it was just recommended to me over on Reddit to try it out as the backend for my “rust as a scripting language” shebang header for faster first-time compiles. https://neosmart.net/blog/2020/self-compiling-rust-code/ https://neosmart.net/blog/2020/self-compiling-rust-code/
- eikenberry 6y agoLast I checked it was only 30% faster than the normal Rust compiler. So unless that's improved significantly, it isn't much help as of yet.
- guipsp 6y ago30% faster is significantly faster
- eikenberry 6y agoIt is significantly faster, just not enough to make a difference when the baseline is so slow.
- mhh__ 6y agoDepends, 30% faster codegen is a good thing to build from but codegen is only a fraction of the actual compilation process.
- chrisseaton 6y agoYou can be 1% faster and be 'significantly' faster. 'Significantly' just tells you about variance of your samples. What matters is if it's usefully faster.
- creata 6y agoI think they meant "significant" as in "of importance", not "statistically significant".
- jez 6y agoI've been trying to catch myself claiming something is "significantly faster" and instead say it's "substantially faster" for this reason. As far as I know, "substantial" doesn't have the same kind of formal definition, and still captures the informal point I was trying to make. I wish that we (collectively) did a better job of reporting statistically significant performance comparisons, and in that light using "substantially" is a reminder to myself to think about whether it would be hard to go the extra mile and collect the data to actually report significance properly.
- The_rationalist 6y agoThe 30% faster was before support for split dwarf was enabled for llvm, I now expect to be faster or as fast as cranelift for debug.
- pizza234 6y agoI've checked a couple of months ago, but only on one relatively small project (~6k lines); the compilation time was reduced by 50%.