Boost logo

Boost :

Subject: Re: [boost] [testing] Add a tester with hidden visibility
From: John Maddock (jz.maddock_at_[hidden])
Date: 2015-05-07 14:10:33


> For reference, AFIO a very simple library sees this with precompiled
> headers enabled:
>
> GCC: 12m => 10m
> MSVC: 7m => 2m
> clang: No change
>
> AFIO also has the ability to both use precompiled headers and not be
> header only:
>
> GCC: 4m
> MSVC: 1m
>
> So especially big wins for GCC.
>
> I suspect that C++ Modules cannot deliver any improvements over the
> non-header only with precompiled headers configuration. Good build
> config always beats compiler magic.

Actually it can - if implemented well - way back when, Borland's C++
compiler had better PCH support than anything else out there, it wasn't
quite C++ modules, but it was quite a decent part of the way there.
They had a little server app that managed and loaded all required PCH's
as AST's into memory, so when a file was being compiled it would just
map the memory from the other process and start compiling from there.
It was lightning fast with near enough instant compile times. And this
was 10+ years ago on hardware that folks would laugh at today. It was
more or less automatic too - if there were no changes to a files
#includes it would just go ahead and cache everything till after the
last #include without the user having to excplicitly mess with PCH's at
all. Of course both templates and C++ in general are a lot more complex
now: this was all pre-STL days! Still it would be nice, if we could
have a compiler/IDE release that wasn't actually 3 times slower than the
one before ;)

With rose tinted spectacles yours, John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk