Boost logo

Boost :

Subject: Re: [boost] [Boost.Move] [Boost.Container] Compiling with older versions of Boost and Performance
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2012-01-10 12:45:15

> Thanks, yes that would be the sensible way to proceed.
> My other question was, though -
> Does Boost::Move library rely on compiler optimisations of
> copy-elision/return value optimisation, as is the case with the Adobe
> Source Library (ASL) Move library, for example. The reason I ask is
> that I
> suspect the compiler I want to target is not very good at said
> optimisations. Or are there any other known factors which could
> mitigate
> against its effectiveness for a. n. other compiler?

Note the RVO (return value optimization) is a feature that is either working or not, similarly to tail recursion in functional languages. This is unlike URVO (unnamed return value optimization), which depends on the code analysis capabilities of a optimizer. (Well, some compilers used to turn off RVO in debug mode, but this should no longer be the case.)

Writing tests to check whether RVO is implemented is easy. I guess you have a pretty good chance that even your compiler supports RVO (so I guess the ASL Move library would work). But this doesn't mean that it will be easy to get Boost.Move working with your compiler.


Boost list run by bdawes at, gregod at, cpdaniel at, john at