Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by gnulinux on Thursday November 07, 2019 @09:42AM
(#21473566)
Please 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?
[ Parent
| on HN ]
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by b1gtuna on Thursday November 07, 2019 @09:53AM
(#21473666)
I 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.
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by DoofusOfDeath on Thursday November 07, 2019 @10:35AM
(#21474082)
Just in case you aren't aware of it, "ccache" helps with this, and you might find it trustworthy enough for your typical weekly rebuild.
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by matthewaveryusa on Thursday November 07, 2019 @10:56AM
(#21474277)
ccache 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
It's a cool little trick few people seem to know.
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by umvi on Thursday November 07, 2019 @11:29AM
(#21474630)
I 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?
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by matthewaveryusa on Thursday November 07, 2019 @01:26PM
(#21475823)
Both, although most of the heavy ones in my projects are from the application-layer/user-defined.
having strings with common vector/map/unordered_map/set/unordered_set template specializations help a bit (i.e basic_string<char>, uint64_t int64_t, int and uint)
My methodology wasn't very scientific: when I found a template being specialized at a low-level, I added it to my list. another heuristic is anything that templates off of std::string (basic_string<char>), char, uint64_t int64_t, int and uint are all pretty good candidates as the likelyhood of them being reused everywhere is high.
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by umvi on Thursday November 07, 2019 @10:37AM
(#21474106)
Are you building like FPGA bitstreams or something? 4 hours seems insanely long for software unless it is literally millions upon millions of lines of code
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by jandrese on Thursday November 07, 2019 @11:01AM
(#21474338)
Maybe he #included boost.
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by gnulinux on Thursday November 07, 2019 @11:22AM
(#21474561)
Maybe it's an aggressively optimizing and correctness-checking C++ compiler. GCC, clang can take a long time depending on complexity of code and flags provided.
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by b1gtuna on Thursday November 07, 2019 @11:59AM
(#21474915)
I've built bitstreams, but these days I build software for consumer electronics with screens running ARM Linux.
Re:AMD Q4:16-core Ryzen 9 3950X, Threadripper Up To 32-Core ...
by leetcrew on Thursday November 07, 2019 @10:02AM
(#21473754)
in large c++ projects it's really hard to avoid the situation where almost every file includes a couple of the same key headers. change one char in an important header and you have to rebuild the whole project.