Boost logo

Boost :

From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2008-05-23 04:27:20


Hi,

On Fri, May 23, 2008 at 3:11 AM, Scott McMurray <me22.ca+boost_at_[hidden]> wrote:
> On Thu, May 22, 2008 at 8:30 PM, Simonson, Lucanus J
> <lucanus.j.simonson_at_[hidden]> wrote:
>>
>> I vote we leave the pow template alone, since it isn't broken and
>> doesn't need fixing. (Yes I know my vote doesn't count.)
>>
>
> Runtime-wise, it may be fine, yes.
>
> The gain is in going from O(N) template instantiations to O(log N),
> which helps at compile-time.

Even at runtime I don't really agree since the solution proposed here
was the one I had originally proposed. And when Joaquin corrected it
by proposing something that better optimizes the number of
multiplications, my tests shew that the gain at runtime was real and
that my compiler didn't do that by itself. This being said, I should
redo my tests to be sure I didn't miss anything.

Anyway, I think all this is a matter of compiler and the best way is
to take compiler's hand to force it to write the right code, even for
those compilers that would have been able to do it by themselves.

Luke, which compiler to you use?

Bruno


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