Boost logo

Boost :

Subject: Re: [boost] "boost cold shoulder" (was proposal for #pragmaoncesupport)
From: John Maddock (john_at_[hidden])
Date: 2009-06-10 12:05:05


> The big problem I have is that there is no evidence that #pragma once
> would actually help in practice. It helps in some super-special case,
> involving 200 basically empty files that all include each other and
> nothing else. I suspect (without any evidence) that if someone came
> along and said "I added #pragma once to the boost headers, and it sped
> up compilation by X% on windows, and didn't slow things down on
> linux / mac os x, and it didn't break any test or library", they might
> well get a less luke-warm response.

Indeed, and if Zach is able to come up with his script and run some tests
that will hopefully lay the matter to rest one way or another.

The only data point I have is that I did add #pragma once directives to the
Boost.Math headers and it seemed to make no difference (a purely subjective
opinion though), optimizing the template instantiations and use of MPL did
have a much larger (ice subjectively noticeable) effect though.

Other than that, careful use of precompiled headers has always been a much
bigger win for me with msvc than any other approach...

Just my unscientific 2c worth... John.


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