Multiple return values...

Manu turkeyman at gmail.com
Tue Mar 13 06:06:29 PDT 2012


On 13 March 2012 13:27, Iain Buclaw <ibuclaw at ubuntu.com> wrote:

> What about alternative optimisations for MRV, rather than stating that
> it should always be returned in registers where possible (and breaking
> ABI on all target platforms).  What about, for example, using named
> return value optimisation in this case to help improve the cost of
> returning on non-x86 architectures.
>
> Just throwing random thoughts out there.
>

What difference would that actually make? The effect is still the same,
unless perhaps you were returning directly into some output structure, that
might be a win in that case (but that's the opposite of what MRV is
actually for).
Definitely no good for slices, and it doesn't help calls, only returns.

The non-x86 platforms don't only suffer from return values, they suffer
passing TO functions as well. So currently they take the hit on both sides.
Slices are fundamental to the language feature, they need to be efficient :/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120313/abf8e9b9/attachment.html>


More information about the Digitalmars-d mailing list