Re: [boost] Measuring compile time performance

Steven Watanabe wrote:
Joel de Guzman wrote:
time is good enough for benchmarking. OTOH, Steven's perl sript is nice because it can (as he says) actually gather info when templates are being instantiated. I haven't used it yet, but it seems to be just the tool we need for profiling templates. Steven, please tell us more about your script.
The scripts are actually a combination of bjam + perl + C++.
At the moment, the only thing that it does reliably is to count the number of times each template is instantiated.
A month or two ago, I tried to make it produce a gprof-like call graph by parsing the instantiation backtraces, but it doesn't really work, and I broke gcc support in the process. Hmmm, I'll try to fix this over fall break.
Thanks Steven, that would be great. We'd certainly be interested in trying what you've got on Fusions compile time performance tests. Thanks to everyone else that provided ideas on this. Dan Send instant messages to your online friends http://uk.messenger.yahoo.com

on Fri Oct 17 2008, dan marsden <danmarsden-AT-yahoo.co.uk> wrote:
Steven Watanabe wrote:
Joel de Guzman wrote:
time is good enough for benchmarking. OTOH, Steven's perl sript is nice because it can (as he says) actually gather info when templates are being instantiated. I haven't used it yet, but it seems to be just the tool we need for profiling templates. Steven, please tell us more about your script.
The scripts are actually a combination of bjam + perl + C++.
At the moment, the only thing that it does reliably is to count the number of times each template is instantiated.
A month or two ago, I tried to make it produce a gprof-like call graph by parsing the instantiation backtraces, but it doesn't really work, and I broke gcc support in the process. Hmmm, I'll try to fix this over fall break.
Thanks Steven, that would be great. We'd certainly be interested in trying what you've got on Fusions compile time performance tests.
Thanks to everyone else that provided ideas on this.
Remember that although the number of template instantiations is important, it doesn't necessarily have a linear relationship to compile times. I think measuring time is still important, and probably more important. -- Dave Abrahams BoostPro Computing http://www.boostpro.com

AMDG David Abrahams wrote:
Thanks Steven, that would be great. We'd certainly be interested in trying what you've got on Fusions compile time performance tests.
Thanks to everyone else that provided ideas on this.
Remember that although the number of template instantiations is important, it doesn't necessarily have a linear relationship to compile times. I think measuring time is still important, and probably more important.
Absolutely. If we had a way to determine how much time was spent instantiating each template, it would be more better. Unfortunately, the time it takes to compile a whole translation unit is not very useful for isolating specific templates to optimize. The time does provide an excellent way to measure how much good any particular optimization did--once we have an idea of what to try. In Christ, Steven Watanabe
participants (3)
-
dan marsden
-
David Abrahams
-
Steven Watanabe