3 ms·
It is parallel at the crate level. So dependencies are compiled concurently with each other. A large rust project should be split into multiple crates. It make
by rapsey 7y ago
It is parallel at the crate level. So dependencies are compiled concurently with each other.
A large rust project should be split into multiple crates. It makes the code much cleaner, flexible and compiles faster.
A stronger machine absolutely makes a difference. Single thread performance of a desktop compared to a laptop also does.
- reitzensteinm 7y agoThis is true, but how often are you recompiling 4+ crates simultaneously? What desktop are you comparing to what laptop? The top end i9 has eight cores, and a max turbo just 100mhz shy of the top end desktop part. The turbo is less aggressive on the laptop, but there's just not that much difference between them for low thread counts. https://en.wikipedia.org/wiki/List_of_Intel_Core_i9_microprocessors https://en.wikipedia.org/wiki/List_of_Intel_Core_i9_micropro...
- rapsey 7y agoWay lower L2 cache however. That is quite important. Compiling multiple crates at the same time is very common in my project.
- reitzensteinm 7y agoThe workstation chips have tons more L2, but the change was made at the same time that they redesigned the L3 to be distributed over a mesh network, significantly reducing its own performance. The boosted L2 compensated to keep the total performance of the cache hierarchy roughly constant while unlocking the future scalability of the mesh network. There will definitely be workloads that benefit from the new cache hierarchy, but there are also those that suffer. If you've measured it on a high end laptop for comparison then, of course, the proof is in the pudding and I'm not going to argue (or if you see >~10 threads in use that's proof enough).
- eptcyka 7y agoUpgrading from a true quad core laptop to a true 12 core zen2 desktop sped up my rust builds by a factor of three. Just some anecdata.
- reitzensteinm 7y agoThat's good to know. I wasn't really intending to get in to an argument about whether rustc threads well, because although I've used Rust a fair bit I haven't built any large projects in it. If people have and it uses all their cores, I totally believe them. What I was trying to do is point out that the correct response to "Rust doesn't thread well" is not "but have you run it on a workstation?". Laptop chips for the first time are extremely competitive for single threaded workloads, because the individual cores in large chips now have equivalent power budgets, you just get a bunch more of them. "Actually, it does thread well" is totally fine as a response, and I'm not going to claim otherwise.
- pjmlp 7y agoWhich is something that doesn't help adoption if buying new hardware is a requirement to have a nice developer experience in Rust, while other AOT systems languages work perfectly well on the same hardware.