PCH now working, should be default?

Benjamin Kosnik bkoz@redhat.com
Tue Mar 4 18:27:00 GMT 2003


>You should have warned folks to look closely at the wall clock time,
>not user+system time.

Sorry about this confusion.

>I looked at user + system first and thought "gee, PCH really didn't
>help much!" :-)

It doesn't, sadly. It's faster, but not by much, and certainly not by 2x
or 3x or 10x as originally planned.

I'm not quite sure why this is the case. Part of this might be the way
it's used at the moment: having a bunch of individual .pch files is
going to be less of a win than one globbed file. If there was a way to
pass a globbed, all-encompasing .pch on the command line as a kind of
"pre-include" things might improve. Geoff if this is possible, please
let me know and I'll work up the necessary runtime bits to try that
approach.

I'm thinking of something like

-fuse-precompiled-first=foo.gch

I don't see such an option here:
http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html#Precompiled%20Headers

Part of this might be just because the problem is with cc1plus, not cpp.
I believe work in that space is ongoing: I'm just trying to help where I
think I can be the most useful.

Here are more accurate timings from my notebook. (PIII/RH8)

I. PCH

make all
598.350u 70.070s 13:17.37 83.8% 0+0k 0+0io 1498254pf+0w

make check
2428.480u 115.590s 48:01.03 88.3%       0+0k 0+0io 1698557pf+0w


II. No PCH

make all
509.260u 57.660s 10:05.96 93.5% 0+0k 0+0io 1456870pf+0w

make check
2421.100u 117.870s 51:10.96 82.6%       0+0k 0+0io 1682430pf+0w

-benjamin



More information about the Libstdc++ mailing list