Re: Batching compile actions _does_ make a difference! _Huge_ difference!
Alen Ladavac <alen <at> croteam.com>
2003-09-14 18:01:13 GMT
> I would be interested to see how your tests turned out if they were done
> in the same way jam might batch compile. E.g. compile groups of 10 or
> 20 source files together.
Why only 10 or 20? Why not all files with same flags? And even if it is only
10 files at the time, it will be much better than 1 at a time.
> This is the kind of test I ran 9 months ago
> and did not see the performance gain you see (this was with VC++ 6.0).
Yes, I know, I've seen your posts, but but the key points are:
1) Large project.
2) Lot of includes (DX9 and windows.h are evil).
3) Must use precompiled headers, and must use the manual version (/Yc, /Yu),
not automatic one (/YX) as it is not good enough.
4) There are no tricks, the compiler used by the .vcproj is same command
line cl.exe, the GUI front end is just sugar coating.
5) Batching does matter. A lot.
The thing is that for a lot of includes, you _must_ have precompiled headers,
and must have them tuned well. Without it, it is so slow that nothing makes a
difference. But if you have precompiled headers for a large project, the .pch
file is several megabytes (cca 7MB in the library B). Each invocation of the
compiler must load that file. I don't know exactly what is going on, but I
speculate that even though the .pch stays in file cache, compiler must parse
its data and recreate its internal lists from it.