4 ms·
The key words in the parent post are 'for me'. Imagine you have a single core compilation process that takes two minutes that you must run 50 times a day. This
by Theodores 7y ago
The key words in the parent post are 'for me'.
Imagine you have a single core compilation process that takes two minutes that you must run 50 times a day. This can happen. Ten percent brings 12 seconds per compile or ten minutes a day. This might not sound great but it means you can get an extra five compiles done. You can also get increased likelihood that you can remember what you were working on. Therefore the marginal gain in single thread performance is well worth having in this use case. The expense of genuine Intel becomes worth it even if you don't have so many cores.
- throwaway_pdp09 7y agoI have a dual core dev machine. Using -j 2 builds twice as fast (approx 35 mins -> 17 mins). Are current compiles really obligatory single thread? Because I sure would like to prop up intel with my wallet.
- tbrock 7y agoAnything JavaScript for example is single threaded for the most part. Also something like linking is typically in parallelized.
- chitza 7y agoMost web development toolchains depend on Node.js, which compiles on a single core.
- kohtatsu 7y agoNode takes advantage of multiple cores. The code is all async by default and that is easy to load onto green threads. This used to be implemented with callback hell, now it's Promises which is actually really cosy (and what Rust is adopting). Random article I found on it: https://medium.com/better-programming/is-node-js-really-single-threaded-7ea59bcc8d64 https://medium.com/better-programming/is-node-js-really-sing...
- oppositelock 7y agoSure, but you're also running a browser at the same time probably with a ton of tabs open as separate processes. Our computers do quite a lot these days, in parallel, and more cores help. Both AMD and Intel are ridiculously fast! You can't really go wrong with either.
- jatone 7y agowhich then shard out to multi processes, still benefitting from more cores being available. I know of at least a few build processes that support that model for node.
- benibela 7y agoFreePascal is single threaded But it is also like 10 times faster than other compilers.
- jatone 7y agofix your compilation process. there are few long running workloads that don't benefit from parallelism.
- rumanator 7y ago> Imagine you have a single core compilation process Who runs builds with a single core compilation process? Are we back in 1990? You are hard-pressed to find a CPU with a single core nowadays, even in the cheapest of consumer segments. Why are you fabricating such an unrealistic case?
- user5994461 7y agoThe linking phase for C and C++ software is basically linear. Nobody's figured out how to multi thread that since before 1990. It takes hours to build large software (Chrome/Firefox/Qt). By the way, one of the biggest improvements in software performance in the past decade comes from link time optimisations during build (LTO), that's all done during linking and it takes FOREVER.
- jcelerier 7y agogold has had threading support since its release in 2008. Likewise for lld, which is an order of magnitude faster than gold. From anecdotal experience of the code I am on right now, relinking a few hundred megabytes of .o's takes less than 2 seconds with lld on my 6900k.
- TazeTSchnitzel 7y ago> The linking phase for C and C++ software is basically linear. Depends how many targets you're building. If you have enough memory, you can link several libraries in parallel.
- rumanator 7y ago> The linking phase for C and C++ software is basically linear. Linking is also IO-bound, and already a solved problem in the sense that there are already plenty of solutions that render linking to be a non-issue. It's far from a decent CPU benchmark.
- Theodores 7y agoThe key phrase was 'for me'. That 'me' could be working on an existing code base that does a bit more than show a web page and can't be written in flavour of the month toolkits.