2 ms·
No -- the point is still that you recompile each header for each source file that uses it. You're right, I was thinking about this wrong. I was thinking that
by nkurz 14y ago
No -- the point is still that you recompile each header for each source file that uses it.
You're right, I was thinking about this wrong. I was thinking that the main cost is not the direct includes (M x N), but that each header further includes other headers. (M x N^O). One-time includes prevent the exponential explosion, but you are still left with M x N. But I tend to use ccache to avoid unnecessary recompilations, so I rarely feel the brunt of this.