I have a project where each C/C++ file uses a bunch of header files. But about 70-80% of the header files that each C/C++ file uses is the same. So to make my code more readable, I am planning to include all the headers that I will need in the project into a single header file say common_headers.h
and include this in all my C/C++ files like this:
#include "common_headers.h"
Now this will include all the necessary headers but also few extra headers that will not be used by an individual file. I want to know if doing this way, would it hit the performance at run time by any chance?
I am fine with a few milliseconds extra delay for compiling the code, but I want to know if this will impact my runtime performance?
Description of headers used:
- Most of them are standard C/C++ headers.
- The user defined headers have inline template functions in them .
- No static functions in user defined headers.
This is my Compiler: g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)