This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51571] No named return value optimization while adding a dummy scope


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51571

marc at kdab dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc at kdab dot com

--- Comment #4 from marc at kdab dot com ---
I would like to strongly oppose the notion that this "just a missed
optimisation and not very critical, really".

NRVO is not just "an optimisation". It's actually one that is explcitly
permitted to change observable behaviour of the program and it's extremely
powerful.

And it it _required_ for performant C++. Just try to return a std::vector by
value to see the importance of this optimisation. This is not missed
optimisation. This is premature pessimisation.

You could just as well stop all optimisation work for the C++ frontend until
this is implemented, because any other optimisation effords are dwarfed by the
overhead when NRVO is expected by the developer but not applied.

Please make this a top priority. Every C++ program will benefit both in text
size and in runtime performance - dramatically.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]