4 ms·
It seems they're benchmarking on toy programs to create media hype. In my previous job I found out two non-removable bottlenecks in C++ builds: 1) linking (I do
by zvrba 11y ago
It seems they're benchmarking on toy programs to create media hype. In my previous job I found out two non-removable bottlenecks in C++ builds: 1) linking (I don't know of any parallel linker), 2) IO (writing of debug information). None of this is relevant in their benchmarks.
In my case, the build result, in _release_ mode, was a DLL file of about 40MB, and corresponding debug info of about 100MB. In _debug_ mode, multiply debug info by a factor of ca 5-10. (Individual PDBs on disk collected together were ~GB, but final PDB was smaller.) Release parallel builds on a 4-core machine, with optimizations and all, (with HT) were noticeably faster because they generated less IO.
Link time of _another_ DLL consisting of many (thousands) separate object files took more time than compilation itself.
There's also another product (I won't name it because it created more problems for me than it solved) which integrates in VS and seamlessly distributes the compilation over machines in the local network. I stopped using it because it often generated corrupt PDB files and messed up IntelliSense in VS.
To summarize, I have two issues with their system (apart from "good enough" solutions for distributed compilation already existing): 1) they say nothing about speeding up the linking stage, and related to that 2) if they mess with linking, I'm not confident that they are reliably handling debug info. Sure, everything works in "toy projects", but.
- TwoBit 11y agoWe've used a distributed compiler product (incredibuild) with great success.
- krasin 11y ago> 1) linking (I don't know of any parallel linker) How about ld.gold?
- zvrba 11y agoOh, I wasn't aware that it was multithreaded. I just found out about it now. Did you benchmark gold to find out how much MT speeds up linking?
- krasin 11y agoI didn't make precise benchmarking, but when used on a real-world codebases, it speeds up linking about 2x. One trick to know: never make ld.gold the default system linker, because there would always be awkward kernel modules which will be corrupted at some point, because they would rely on ld.bfd. Instead, it's recommended to specify -fuse-ld=gold in the command line for your code, see https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
- imaginenore 11y agoWhat do you mean by "toy"? In this example GCC takes 3+ minutes: https://drive.google.com/file/d/0B1WlUivCnXhyRVk0LUl6akxVU2s/view https://drive.google.com/file/d/0B1WlUivCnXhyRVk0LUl6akxVU2s...
- yrnkrn 11y agoWe (zapcc) do nothing for link acceleration or debug info. The standard system linker is used. zapcc works well for C++ templates found in all modern C++ libraries.