8 ms·
I wonder how fast I can compile my code base with this. On my hexa-core i7-8850h, it often takes more than 4 hours to build everything in full throttle. And I d
by b1gtuna 7y ago
I wonder how fast I can compile my code base with this. On my hexa-core i7-8850h, it often takes more than 4 hours to build everything in full throttle. And I do this quite often, so pain is definitely present. Given the network and disk i/o aren't the bottleneck, having more than 5 times the cores should theoretically reduce the build time at least by 3 folds, conservatively?
- jchw 7y agoI’ve experienced very substantial improvements in compilation times jumping from the 2700X to the 3900X. I suspect the 3950X should be even better, as long as there are not frequency issues.
- Tepix 7y agoJust curious, why do you have to "build everything" quite often? Normally it's enough to just build the parts that changed. Perhaps you can improve your build process instead of investing in new hardware?
- ownagefool 7y agoNot the OP, but nightly build to prove it all still works is a pretty common thing. Reasons for mysterious breakage: - Compiler Updates - Dependencies getting lost - Code changes (you break things into parts, doesn't mean they work together now).
- b1gtuna 7y agoYes. I don't do nightly, but weekly. Some changes still trigger long builds that last multiple hours.
- ajuc 7y agobinary stability in c++ is hard, especially with dynamic plugins. You need to make daily or at least weekly build from scratch to confirm everything works. Otherwise for example things might seem to work because you are changing a field in class named x through api with a different name for it, and it won't work when you use new version on both sides. These kinds of bugs are the worst.
- gnulinux 7y agoPlease don't mind me asking, but why do you compile your entire codebase often? What's the challenge of splitting it into units and compiling each of them independently when code is changed?
- glouwbug 7y agoProbably header only C++
- b1gtuna 7y agoI suppose I should've provided more context. My build usually takes a few minutes only during the day, as the changes are small and they are broken into multiple packages / units. Once or twice a week, some changes trigger chain reaction and takes 4+ hours to build. This is painful because it eats up chunk of my productivity. And perhaps once a week, I build from scratch just to prove everything still can be built from scratch.
- DoofusOfDeath 7y agoJust in case you aren't aware of it, "ccache" helps with this, and you might find it trustworthy enough for your typical weekly rebuild.
- matthewaveryusa 7y agoccache has been huge for me -- can't recommend it enough. The next big win for me was externing common templates into its own translation unit: http://gameangst.com/?p=246 http://gameangst.com/?p=246 It's a cool little trick few people seem to know.
- umvi 7y agoI read the article, but I'm still a little confused. Do you put common std templates into their own translation unit, or are you putting only your own user-defined templates into their own translation unit?
- sirn 7y agoFor what it's worth, Linux kernel compilation took about 6~7 minutes with -j25 on Ryzen 3900X (12C/24T).
- akhilcacharya 7y agoI have no sense of how long that is. What would it take on a 4 thread Macbook Pro?
- leetcrew 7y agodepends which four thread MacBook pro... as a rough reference, it took about 35 minutes to build the linux kernel on my xps 13 a few years ago. that computer has a 2C/4T kaby lake processor. your macbook pro might be a little faster if it doesn't have one of the ultra low power CPUs.
- sirn 7y agoI have not tried installing Linux on a more recent MacBook Pro (USB-C generation) so I couldn't tell, but I remembered it took around an hour with Arch Linux's default config (e.g. "let's compile this and go have a breakfast & make a coffee and hope it's done")
- fwip 7y agoWent to lunch and timed a compile of the linux kernel (v3.19) (default options) at 14 minutes on my 13" 2015 macbook pro. (3.1 GHz Intel Core i7, 16GB RAM).
- lima 7y agoHuh? I can do a full kernel rebuild in ~40s on a 3900X.
- sirn 7y agoMaybe because Arch has more modules enabled than the default config?
- pstrateman 7y ago
- opencl 7y agoPhoronix does compilation benchmarks (for the Linux kernel and LLVM), the existing Ryzen chips do perform quite well on them. The i5-8400 is probably the closest thing on the chart to your 8850h. But there are diminishing returns to adding more cores past a certain point which will depend on your codebase and compiler. If your builds are at 100% CPU utilization most of the time then you will probably see pretty large gains, but sometimes a significant chunk of the time ends up being bottlenecked by single threaded performance. https://www.phoronix.com/scan.php?page=article&item=ryzen-3700x-3900x-linux&num=7 https://www.phoronix.com/scan.php?page=article&item=ryzen-37...
- b1gtuna 7y agoThanks for the comparison. How do you know the 8850h is desktop equivalent to the i5-8400? I can't seem to find it in the chart.
- ylere 7y agoPassmark benchmarks are usually a good indicator [0]. They're also from the same generation and have the same number of cores. [0] https://www.cpubenchmark.net/compare/Intel-i5-8400-vs-Intel-i7-8850H/3097vs3247 https://www.cpubenchmark.net/compare/Intel-i5-8400-vs-Intel-...
- b1gtuna 7y agoAh great, thanks. It's actually very helpful. I was actually looking at the Passmark score a week ago, but couldn't tell if it's trustworthy. Nice to get an endorsement.
- urmish 7y agoDoes linux compilation take a few minutes? The chart there says Ryzen 3 2200G takes 242 seconds to compile the whole kernel. I find that difficult to believe.
- opencl 7y ago
- gameswithgo 7y agogcc tends to compile quite a bit faster on the new Ryzens vs Intel due to the large l3 cache, so you may get quite an improvement.
- willvarfar 7y agoI don’t know your codebase but my experience with slow compiles when using ninja or make -j or whatever is that it has always been the overuse of code-generators or templates or something like that. A bit of strategic de-templating usually works wonders.
- Matthias247 7y agoI think it might depend a lot on the compiler and codebase you use. I got myself a 3900x, and for compiling Rust code it's actually not that much of a speed-up as expected. A lot of things are done in serial fashion - e.g. compiling single crates and linking. The average utilization during compiling a large project was maybe between 40 and 60%. When compiling LVVM however all cores where churning along at 100% utilization, so I expect a big speed-up there.