On 13 March 2012 13:27, Iain Buclaw <ibuclaw@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 :/