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

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.



some are hopeful it will provide a faster debug compile option, and/or just a non llvm dependent option


Last 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.


I've checked a couple of months ago, but only on one relatively small project (~6k lines); the compilation time was reduced by 50%.


The 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.


30% faster is significantly faster


You 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.


I think they meant "significant" as in "of importance", not "statistically significant".


I'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.


Depends, 30% faster codegen is a good thing to build from but codegen is only a fraction of the actual compilation process.


It is significantly faster, just not enough to make a difference when the baseline is so slow.


Indeed - 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/




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

Search: