Re:Ask HN: What is it about compiling that is so time-consum...
by boppo1 on Monday January 30, 2023 @08:55PM
(#34589856)
On this topic: I'm building a computer for the first time in many years, mostly for writing C & C++ code. But do I optimize for RAM or CPU? Is multithreading helpful in compilation?
[ Parent
| on HN ]
Re:Ask HN: What is it about compiling that is so time-consum...
by IncRnd on Monday January 30, 2023 @10:34PM
(#34590546)
RAM. RAM. RAM. When compiling, a slow CPU can be make tolerable by adding RAM, but speed of compilation won't significantly increase by speeding up the CPU, when there is insuffient RAM.
Re:Ask HN: What is it about compiling that is so time-consum...
by scott00 on Monday January 30, 2023 @10:37PM
(#34590569)
The most important thing is to have enough RAM that you don't have substantial swapping. For me that's at least 32 GB currently, running a heavy IDE (Visual Studio) and a hefty helping of Electron apps. Adjust down if you use vi and console only. Adjust up if you're going to be running VMs or container.
In the middle ground it's mostly about CPU and disk, but exactly what cpu specs are use case specific. Depending on what software you're building I could easily see the bottle neck in either single core performance, core count, or file io.
At the high end, if you're bottlenecked on IO even with nvme disks you could consider getting enough RAM to develop on a ramdisk.
The great thing though is you don't have to guess. AWS and friends will give you short term rentals on a wide variety of hardware. Try them out on a representative workload and see what the difference is.
Re:Ask HN: What is it about compiling that is so time-consum...
by RugnirViking on Tuesday January 31, 2023 @04:53AM
(#34593273)
depends on the budget, but with ram its not about "as much as possible" but rather "enough". More RAM will be a big improvement if you have 8gb or less, but above 16/32gb you won't get much difference.