slow C++ compilation: a trillion dollars in losses
Have you ever wondered how much money the entire world loses due to slow C++ compilation? Thinking isn’t exactly in vogue these days, so let’s just ask an AI.
Let’s see... Estimates vary, of course, but we’re talking tens of billions of dollars per year! And how many years has the world been using C++? Multiply that by 30, and you get a TRILLION dollars!!!
...
C++ compiles slowly. So, what’s the root of the problem? It’s an entirely unnecessary issue: the redundant, repeated recompilation of header files!
...
Let’s put it this way:
1. Just imagine a house with a porch. Think of the seventies and pure C: your house is the source code, and the porch represents the headers.
2. Now, consider C++ in the nineties: the porch has grown to the size of the house itself! Then, it expands to the size of several houses!! You have to walk a hundred meters just to enter or leave your own home...
3. And with the STL and Boost, the porch is now the size of an entire city!!! You end up having to walk ten kilometers just to reach the damn house!!
Never build anything without an architect.
...
I use a "batch build": a well-thought-out variation of a "unity build." You can find more information and two useful utilities in my article: https://ders.by/cpp/build/build.html
slow C++ compilation: a trillion dollars in losses
Have you ever wondered how much money the entire world loses due to slow C++ compilation? Thinking isn’t exactly in vogue these days, so let’s just ask an AI.
Let’s see... Estimates vary, of course, but we’re talking tens of billions of dollars per year! And how many years has the world been using C++? Multiply that by 30, and you get a TRILLION dollars!!!
...
C++ compiles slowly. So, what’s the root of the problem? It’s an entirely unnecessary issue: the redundant, repeated recompilation of header files!
...
Let’s put it this way: 1. Just imagine a house with a porch. Think of the seventies and pure C: your house is the source code, and the porch represents the headers. 2. Now, consider C++ in the nineties: the porch has grown to the size of the house itself! Then, it expands to the size of several houses!! You have to walk a hundred meters just to enter or leave your own home... 3. And with the STL and Boost, the porch is now the size of an entire city!!! You end up having to walk ten kilometers just to reach the damn house!!
Never build anything without an architect.
...
I use a "batch build": a well-thought-out variation of a "unity build." You can find more information and two useful utilities in my article: https://ders.by/cpp/build/build.html