5 ms·
If you read the article, one of the issues holding back performance is the poor parallelism of the compiler. How does a single laptop core compare to a single
by reitzensteinm 7y ago
If you read the article, one of the issues holding back performance is the poor parallelism of the compiler.
How does a single laptop core compare to a single core of the fastest workstation money can buy? It's the same silicon with a touch higher power budget. Unless you time it, the difference is imperceptible.
- rapsey 7y agoIt 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.
- pixelpoet 7y agoI did read the article thank you very much, which is why I said that performance measurements without specifying the hardware is useless. I think the 5 GHz i9 with fast desktop memory (hardly a big investment for a company paying programmer salaries) would absolutely demolish the average laptop CPU with slower memory and bus speed. Yes, even in single thread; probably factor of 2+. Moreover, even though parallelism is limited in this case, it surely will use more than one thread, and in other cases it's less limited and you still have this real issue to confront: why pay more for a slower system? Seriously, what are the overriding considerations?
- reitzensteinm 7y agoWhy are you comparing a top of the line workstation with an average laptop? They're different markets. The fastest laptop chips are extremely fast at executing lightly threaded programs. I'd own a workstation if it sped up my tools. But it won't.
- pixelpoet 7y ago> Why are you comparing a top of the line workstation with an average laptop? Because it's something you can absolutely do to improve your computing life with a simple, rational calculation, which I will outline now for expensive (relative to US hardware prices) Germany. PC dev box parts, prices sourced from geizhals.de: * Ryzen 9 3900x, 490 euros: https://geizhals.de/amd-ryzen-9-3900x-100-100000023box-a2064391.html https://geizhals.de/amd-ryzen-9-3900x-100-100000023box-a2064... * Top end X570 mobo, 200 euros: https://geizhals.de/gigabyte-x570-aorus-elite-a2078208.html https://geizhals.de/gigabyte-x570-aorus-elite-a2078208.html * 32 GB DDR4-3200, 144 euros: https://geizhals.de/g-skill-ripjaws-v-schwarz-dimm-kit-16gb-f4-3200c16d-16gvkb-a1327025.html https://geizhals.de/g-skill-ripjaws-v-schwarz-dimm-kit-16gb-... It's missing other stuff, but those can be quite cheap and don't need upgrading as often, and you maybe don't need the fanciest motherboard. (Going with Intel at this point is a complicated topic due to security issues and mitigation performance hits, to be balanced against having the most obscenely fast performance possible for a bit more money.) Anyway, let's call it ~2k euros for a truly badass 12c24t 32GB memory dev box. Compare this to, say, the common and much-loved Macbook Pro: that's 1.5k to 3.2k euros (just checked). The former for a super weak computer, the latter is 2.3 GHz 8c(16t?), 16 GB 2666 MHz memory. That's really weak computing power for the amount you're spending (yes, I understand you're not buying pure performance, but that's what's being compared here), and you don't even really "want to do better" with higher clocks etc because, speaking in purely physical terms, you need more volume and cooling to get the higher throughput. Laptops also start to throttle way sooner than computers with big coolers (that needn't cost much- I'm using a 15 euro cooler on my i7 8700k at 4.7 GHz which is passive without significant load). So that's it really; for about the price of a weak Macbook Pro, you could have an ultra powerful dev or build box. You can get some really amazing screens for little money these days, and re-use it between upgrades, along with several other components; how much of your laptop do you usually re-use when upgrading? I've now spent a truly excessive amount of time justifying my point of view, in the hope that I don't sound completely delusional. 1.5-2k euros once every few years for your developers to have peak dev performance is IMO an easy sell; if your laptop is a thin client you can have it additionally and it won't need upgrading for ages, because it doesn't need to do any heavy lifting. > They're different markets. False dichotomy, they can be (and usually are) additive, because you can rdesktop and use remote CI. What I'm questioning is the relevance of laptops as primary build computers.