I am working on a project at work where codes are loaded and loaded into header files. If I were using Visual Studio, that would not be a problem, since it has precompiled headers, etc., but this is Linux GCC code.
In any case, this starts to worry a bit about compilation time. Of course, the templates should remain in the headers, etc., but most of this code can be extracted into implementation files and linked as a static library. All projects use these headers and get together every time, so it makes sense to create a static lib.
Are the implementations in the header files aligned or is this just a hint, build the inline keyword? This code is very important for time, and I am worried about moving implementations from headers. Can I achieve the same if I use the inline keyword and not the implementation in the header files?
** UPDATE ** I know that inline is just a hint to the compiler. I do not control everything in the project, and I just want to move everything from the headers to the library without affecting performance. Will it be an attempt to try and see? I just want to maintain performance in exactly the same way, but increase compilation time.
source
share