On Tue, Jun 12, 2007 at 01:13:44PM -0700, Mark Glines wrote: > On Tue, 12 Jun 2007 11:39:35 -0700 > Allison Randal <[EMAIL PROTECTED]> wrote:
> > Do we have any proof that it does speed up compilation with msvc? > > Littering our code with "optimizations" for odd compilers is also an > > unhealthy precedent. > I just came up with an artificial benchmark and found that gcc-3.4.6 > runs slightly faster with #pragma once protecting a header that includes > lots of other headers. (a chain of 200 other headers, in my test.) By > "slightly", I mean "compare a 0.86 second average to a 0.92 second > average, for 10 runs each". > > For a more realistic benchmark, parrot r18883 compiles in 3m29.363s, > parrot r18884 compiles in 3m29.190s. So, for gcc-3.4.6 at least, I > think the difference might be lost in the noise. Or better yet, lose it by using ccache. > On the other hand, will #pragma once allow us to get rid of all of > those ugly header guard macros? If so, I would argue to keep it for > maintenance reasons, regardless of any performance benefits. No, because you cannot rely on it working. Nicholas Clark