3 ms·
Rust has an 'excuse' for compile speed, in that, the compiler is ostensibly doing 'more work'.
by jariel 6y ago
Rust has an 'excuse' for compile speed, in that, the compiler is ostensibly doing 'more work'.
- Trasmatta 6y agoI'm not sure what you're implying by this, because the Crystal compiler is doing a lot of work as well. The global type inference is the primary reason for Crystal's compiler speeds, and it's why it's not likely to substantially improve. It's not slow for the sake of being slow.
- jariel 6y agoJava does type inference in a number of places and javac is not slow.
- linkdd 6y agojavac produces Java bytecode, not LLVM IR. javac exists since at least 15 years, Crystal "only" 6 years. Maybe things will get better with time?
- Trasmatta 6y agoJava doesn't do type inference at the level of Crystal. It's not the presence of type inference, it's the fact that almost everything in a Crystal program can be inferred.
- edflsafoiewq 6y agoWhat work would that be?
- jariel 6y ago? The borrow checker which is literally the reason Rust exists.
- edflsafoiewq 6y agoBorrow checking is almost always very cheap, and lifetime are erased before codegen which is the really slow part.