
On 10 Jun 2009, at 02:13, Jeff Flinn wrote:
Chandrashekhar Kumar wrote:
On Tue, Jun 9, 2009 at 11:33 PM, Christopher Jefferson < chris@bubblescope.net> wrote:
RedundantGuard: 0.130s Nothing: 0.170s PragmaOnce: 0.710s
So PragmaOnce is over 7 times slower. That time is almost entirely in the 'sys' column, so I suspect it querying files to check if they are identical or not.
Chris
Did you check repeatablity of these measurements? Disk caches can significantly skew timings. Were these separate files with the various include guard techniques? If so is the disk fully defragged?
Yes, I ran each experiment 10 times and averaged. Just as a sanity check, I wrapped each #pragma once in a #ifdef BOOST_USE_PRAGMA_ONE, and then not defining it. As expected, the result is indistinguishable from the 'Nothing' choice. I just wanted to check it wouldn't confuse any kind of 'auto header- guard' detection gcc might have. Chris