It is obvious that given any large codebase separate compilation of modules can significantly cut down compilation time. Still, I wonder if it worth to compile a production release in a single step, considering that the longer the code the more optimization can take place across. Is this presumption right?
The question is not language or tool specific but I’m particularly interested in C++ and GCC.
Yes it is. In fact, it’s a compilation strategy that’s used by almost any modern compiler out there.
You may want to look up IPO and LTO.