News for hackers. Stuff that matters.
[dead]
Re:The Rust Compilation Model Calamity by pjmlp on Friday January 31, 2020 @04:34AM (#22200311)
Lots of companies have standardized on laptops as development environment since the mid-2000's, their IT department is not going to change back to desktops, specially when the laptops are working just fine for their existing tools.

If adopting Rust means buying new hardware, then they will just keeping using their existing options regarding programming languages.

Re:The Rust Compilation Model Calamity by Skunkleton on Thursday January 30, 2020 @07:33PM (#22197671)
You might not like it, but lots of developers use laptops as their primary computer. Performance is relative anyway.
[dead]
Re:The Rust Compilation Model Calamity by zodiac on Thursday January 30, 2020 @07:41PM (#22197732)
Here's a disagreement: you're right that it would be nice if benchmarks included desktops, but I continue to want to do "serious work" on my (expensive, underpowered relative to a desktop) laptop.
[dead]
Re:The Rust Compilation Model Calamity by umanwizard on Thursday January 30, 2020 @07:52PM (#22197819)
Answering your question in good faith, though it seems obvious to me: people prefer laptops because they are portable. You can work from home, or the train, or another city, or a meeting room.

By the way, it is possible to connect a laptop to whatever monitors and keyboard you want

Re:The Rust Compilation Model Calamity by rsynnott on Friday January 31, 2020 @02:38PM (#22204822)
> why on Earth people would prefer laptops over large dual monitors, full sized keyboards, ... and so much better performance and cost effectiveness.

I think I'd struggle to bring that around meeting rooms all day. I have a monitor and keyboard to plug in on my desk, of course...

Re:The Rust Compilation Model Calamity by skavi on Thursday January 30, 2020 @07:59PM (#22197874)
The reason is obviously portability. People like the ability to take their entire development workstation wherever they please, or perhaps to even sit on a sofa or bed.

I’m not sure why you’d need that explained.

Re:The Rust Compilation Model Calamity by barrkel on Thursday January 30, 2020 @08:47PM (#22198228)
For me it's because it's what the business mandates. I have a docking station so I still have two big monitors (three if I want to keep the laptop open) and a mechanical keyboard, but the business wants me to use a laptop because it can be locked away after work, it can be brought home for home working or on call, and it's part of the disaster recovery plan should the office become unusable.
Re:The Rust Compilation Model Calamity by codetrotter on Thursday January 30, 2020 @07:57PM (#22197861)
Because a laptop is possible to carry with you when you go places, and a desktop is not.
Re:The Rust Compilation Model Calamity by stanferder on Thursday January 30, 2020 @08:30PM (#22198107)
Laptops can be carried to meetings, so you always have your whole setup with you, and they make it easier to do work someplace other than your desk.
Re:The Rust Compilation Model Calamity by shakna on Thursday January 30, 2020 @08:13PM (#22197999)
> I'm not trying to excuse slow builds, but I'm frustrated that people basically always do benchmarks on laptops. Like, come on, if you're doing serious work, use a serious computer;

This reads as a dismissal. That you can only be a serious developer if you have a permanent setup where you sit down, and don't move from it.

Many devs are not just sitting at a desk or cubical writing code.

They may need to interact with clients, move between locations, even across cities. They may even be in the horrifying hot desk situation.

In all of those, working with a laptop makes sense.

Re:The Rust Compilation Model Calamity by dirtydroog on Friday January 31, 2020 @07:38AM (#22201124)
They should be provided with SSH access to a proper build machine then.
Re:The Rust Compilation Model Calamity by flukus on Thursday January 30, 2020 @10:21PM (#22198725)
> if you're doing serious work, use a serious computer

A dual core laptop with 2GB of RAM is a very serious computer, it's a supercomputer compared to what I had 20 years ago for doing essentially the same tasks.

Slow software is not the machines fault.

Re:The Rust Compilation Model Calamity by reitzensteinm on Thursday January 30, 2020 @07:47PM (#22197777)
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.

Re:The Rust Compilation Model Calamity by rapsey on Thursday January 30, 2020 @07:55PM (#22197851)
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.

Re:The Rust Compilation Model Calamity by pjmlp on Friday January 31, 2020 @03:28AM (#22200041)
Which 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.
Re:The Rust Compilation Model Calamity by reitzensteinm on Thursday January 30, 2020 @08:12PM (#22197994)
This 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_micropro...

Re:The Rust Compilation Model Calamity by eptcyka on Thursday January 30, 2020 @10:09PM (#22198653)
Upgrading 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.
Re:The Rust Compilation Model Calamity by reitzensteinm on Friday January 31, 2020 @12:26AM (#22199327)
That'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.

Re:The Rust Compilation Model Calamity by rapsey on Thursday January 30, 2020 @09:14PM (#22198361)
Way lower L2 cache however. That is quite important.

Compiling multiple crates at the same time is very common in my project.

Re:The Rust Compilation Model Calamity by reitzensteinm on Thursday January 30, 2020 @09:41PM (#22198495)
The 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).

Re:The Rust Compilation Model Calamity by pixelpoet on Thursday January 30, 2020 @07:58PM (#22197866)
I 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?

Re:The Rust Compilation Model Calamity by reitzensteinm on Thursday January 30, 2020 @08:10PM (#22197978)
Why 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.

Re:The Rust Compilation Model Calamity by pixelpoet on Friday January 31, 2020 @03:39AM (#22200087)
> 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-a2064...

* Top end X570 mobo, 200 euros: 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-...

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.

Re:The Rust Compilation Model Calamity by roca on Thursday January 30, 2020 @08:10PM (#22197973)
I have a ~200K line Rust project split into about 50 crates without about 700 dependent crates. It is not much faster to build on an 18-core AWS machine (c5d.9xl) than on my quad-core laptop.
Re:The Rust Compilation Model Calamity by eptcyka on Thursday January 30, 2020 @10:10PM (#22198660)
Most likely due to I/o limitations.
Re:The Rust Compilation Model Calamity by roca on Friday January 31, 2020 @12:58AM (#22199464)
I kinda doubt it. That machine has 72GB of RAM and everything can fit in cache. Also, building a very much larger C++ project (e.g. Firefox) can saturate all the cores no problem.
Re:The Rust Compilation Model Calamity by glandium on Friday January 31, 2020 @03:12AM (#22199971)
That's one of the biggest problems with rust. In many cases, the dependency graph is such that not a lot of crates can be compiled at the same time. Compound with the fact that building some crates can takes minutes, and overall build times can be terrible.

Just look at the CPU usage on a >= 16 cores machine while building the rust compiler itself. The only time all cores are used, essentially, is while building LLVM.

Re:The Rust Compilation Model Calamity by sp332 on Thursday January 30, 2020 @07:54PM (#22197838)
Laptops are also bad for benchmarks because there's a lot of state that has to be communicated to reproduce the conditions: plugged in or unplugged, power saving settings, and as you mentioned the risk of overheating. But none of that seems relevant here because the ratio of build times should be similar on any modern hardware.
Re:The Rust Compilation Model Calamity by jupp0r on Thursday January 30, 2020 @08:37PM (#22198159)
> This "mobility über alles" weighting truly baffles me in the face of how much better and cost efficient PCs are.

I absolutely disagree. The mental overhead and time it takes to synchronize my work over multiple machines stands in no comparison to the few thousand dollars I'd save every few years by having desktop computers everywhere. If compilation is slow, use a distributed compiler infrastructure (if your language supports this, mostly writing C++ here).

If you are doing serious work, do it in the cloud. If you have an actually big codebase to compile, you need to scale that horizontally anyway and an expensive workstation under your desk will take hours anyway.

Re:The Rust Compilation Model Calamity by pixelpoet on Thursday January 30, 2020 @10:13PM (#22198674)
> If you are doing serious work, do it in the cloud.

In some sense I think we agree, except the cloud is just someone else's powerful computer. Laptop as thin client via rdesktop is how I developed (also C++) for years, but only when I was at home away from my work computer. With the cloud you're always away from your work computer.

> If you have an actually big codebase to compile, you need to scale that horizontally anyway and an expensive workstation under your desk will take hours anyway.

Agreed, and that's further along the same vector: if you have performance issues with compilation, consider also (not only, before someone jumps on me) using bigger machine(s) for the job.

Anyway, I'm going to stop here. Feels like I found the most hated tech opinion ever... at least eventually there were some thought-out replies (and thank you for yours).

Re:The Rust Compilation Model Calamity by jupp0r on Friday January 31, 2020 @01:16AM (#22199539)
Thanks, it seems we agree and I completely misunderstood the intent of your original post (still didn't downvote because it seemed like a helpful contribution to the discussion).
Re:The Rust Compilation Model Calamity by wmf on Thursday January 30, 2020 @07:59PM (#22197883)
If you applied a liberal amount of benefit of the doubt you might assume that they are compiling on the fastest available hardware because they are already aware that developer time is more expensive than hardware.

Speaking of mobility, a 9980HK in a laptop is basically the same as a 9900KS for a lightly-threaded workload like (apparently) rustc. You might be able to reduce compile time by increasing fan speed, though.

Re:The Rust Compilation Model Calamity by dirtydroog on Friday January 31, 2020 @07:35AM (#22201107)
I'm on your side pal! Laptops are a total waste of money, Ryzen has changed the game.