3 ms·
Maybe it's just because I'm not regularly re-building Rust projects with enormous changes, but I very rarely experience the compile time in Rust to be an issue
by qchris 6y ago
Maybe it's just because I'm not regularly re-building Rust projects with enormous changes, but I very rarely experience the compile time in Rust to be an issue compared with a language like C++ or even a Jupyter notebook that's re-evaluating a cell. I usually code with a bottle of water or cup of coffee nearby, and when I hit 'enter' on the 'cargo build/run' command, I often pick up my cup and take a sip. By the time I've put the mug back down, the compilation is usually over. So I guess the quantum of time when I'm coding is a sip of coffee, and anything less than the time it takes to do that feels functionally the same to me.
Granted, first-time compilation takes a while, but once that's taken care of, I don't update my toolchain often enough for it to have a noticeable impact on my workflow. I guess if you're getting a new nightly build every day and re-compiling everything, that might be a pain, but that doesn't seem to be the root of most people's complaints.
- pdimitar 6y agoI am only talking about the "change a line -> recompile -> run -> inspect -> change a line ..." workflow. As mentioned in my comment above, for most people waiting a few seconds is a funny non-issue but it directly affects my motivation to rapidly iterate. The "take a sip" brain hack might work, I'll try it. :) But I try to follow rules for proper hydration which means that you shouldn't sip water every other minute -- there have to be pauses. It's a good advice regardless. I'll see if I can adopt a variation of it.
- qppo 6y agoSeven seconds sounds like a long time. What dependencies are you using when you see this? If there's a lot of macro expansion going on that could explain some of it.
- pdimitar 6y agoI don't have much influence on the deps just yet, I am a noob in the company's stack still. I might be able to minimize them in the future but for now we have no small amount of proc-macro libraries. Plus, I am talking about a company-issued laptop. It's quite the fast and strong cute little thing but we all know even the strongest mobile CPUs can't measure up to desktop CPUs, especially when it comes to compilation.