|
Boost : |
From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2002-11-10 00:30:22
>From: "David Abrahams" <dave_at_[hidden]>
>"Terje Slettebø" <tslettebo_at_[hidden]> writes:
>>>From: "Gennaro Prota" <gennaro_prota_at_[hidden]>
>>
>>>On Sat, 9 Nov 2002 17:14:49 +0100, "Terje Slettebø"
>>><tslettebo_at_[hidden]> wrote:
>>
>>>> In any case, the
>>>>program below detects presence of NRVO, by returning zero, or greater
than
>>>>zero if NRVO is not present.
>>
>>>Actually it shows whether that optimization is applied in a specific
>>>example.
>>
>> True. But it's better than nothing. :) Intel C++ applied the NRVO, even
with
>> all optimisations turned off. In the same way, MSVC 6 did not, regardless
of
>> settings.
>I suspect that you'll find this to be the case on most compilers. The
>RVO doesn't fall into the category of back-end or
>intermediate-language optimizations that compilers usually let you
>turn on and off. It has to happen in the front-end, since it often
>implies observable differences in the code's behavior.
Yes, that's what I expected, too, since this was mentioned the last time RVO
was discussed.
Regards,
Terje
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk