|
Boost : |
From: Ross Smith (r-smith_at_[hidden])
Date: 2001-12-21 17:55:39
Toon Knapen wrote:
>
> Beman Dawes wrote:
> >
> > Just out of curiosity, was this a debug or an optimized build?
> >
> > Do you know if the compiler involved normally has a low abstraction
> > penalty?
>
> Sorry, vital info was missing : I used gcc-3.0.2 with option -O4.
> (gcc-2.95.3 won't compile multi_array).
GCC 3.0.x releases have a flawed inlinming strategy that leads to a
significant template penalty. 3.0.2 is better than its immediate
predecessors, but it still leaves something to be desired in that area.
(A real fix is expected in 3.1; due out in April, or you could try the
current snapshots from that branch.)
Also, -O4 is an undocumented option; I have no idea what (if anything)
it does, or whether it would be expected to produce better code than the
documented optimisation options. The GCC experts generally agree that
-O2 should be considered the normal "best optimisation" setting, and
higher options (-O3 and the undocumented higher values) should only be
used when you've analysed the generated code and know that you need
specific nonstandard optimisations.
-- Ross Smith ...................................... Auckland, New Zealand r-smith_at_[hidden] ......................... http://storm.net.nz/~ross/ "We need a new cosmology. New gods. New sacraments. Another drink." -- Patti Smith
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk