Pre-compiled headers?

This is an idle question, so don’t go killing yourself over it if you do stuff like that.

If I remember things correctly (not extremely likely for me), I’ve heard that to speed up the compiling process of a program in c++ they insert headers already compiled. If this is true, does that mean it’s been compiled to machine code? Or is it asm? And after it gets inserted in with the preprocessor does the compiler ignore it? Am I asking an irrelevant and annoying that depends on too many things?


Basically how I’m imagining this working out:

Code before compilation
1
2
3
4
5
#include <vector>

int main(){
  
}


Code after preprocessing
1
2
3
4
5
6
7
8
1001010101011111010101
1010101010111010101101
1010101010101010100110
1010101010010101010101

int main(){

}


Code after full compilation
1
2
3
4
5
6
7
1001010101011111010101
1010101010111010101101
1010101010101010100110
1010101010010101010101

1010100110101100101001
1010100101010010100101



Also as a side note: if this is a thing and how it works out, could I include my object files in my main program instead of my actual file?
Last edited on
Thanks!
Registered users can post here. Sign in or register to post.