3 ms·
> In most cases, Rust's very strong type system means you spend a lot less time actually running your program. > There are definitely exceptions though. I mea
by klabb3 3y ago
> In most cases, Rust's very strong type system means you spend a lot less time actually running your program.
> There are definitely exceptions though.
I mean.. I know what you mean but this is kinda what I meant with cope. Putting “running code” aside as an edge case seems like a dangerous moving-the-goalpost kind of Rustism that kinda grew out of the “Rust is so safe that if it compiles it’s correct”-meme. Once we’re doing serious and boring good old development, it’s a redeeming quality at best, imo. Not to mention that rust analyzer also suffers slowdowns in similar ways.
> LLVM is still the vast majority
That’s interesting. So why the meager numbers from cranelift then, judging by the post? Granted, I’m not doing Rust day-to-day anymore so I’ve been ootl.
> Because Rust's unit of compilation (a crate) is very large. In C/C++ it's a single file.
Isn’t this the same for Go? Sure, it’s a simpler language but we’re talking many, many times on similar sized projects (wish I could link to something but unfortunately anecdotally only). Is it monomorphization, macros, or just everything combined?
- nindalf 3y ago> So why the meager numbers from cranelift then People are seeing 20-30% improvements thanks to Cranelift. Not sure why you think that’s meagre. > edge case It’s not an edge case but it is valid to say that the pattern of development is different. You’re right that people need feedback that what they’re doing is right within 1-2 seconds. They are getting that thanks to the IDE. They need their tests to compile and run within a few seconds, and they’re getting close to that. I’m not disagreeing with you. In an ideal world all builds and tests would run within 2 seconds, like you’re suggesting. And yet, people are managing to ship software successfully, despite it taking more than 2 seconds. That suggests that maybe this 2 second thing isn’t a requirement and more of a nice to have. And that maybe, there is something to people relying on IDE feedback while coding.