<div class="gmail_quote">On 13 March 2012 13:27, Iain Buclaw <span dir="ltr"><<a href="mailto:ibuclaw@ubuntu.com" target="_blank">ibuclaw@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>What about alternative optimisations for MRV, rather than stating that<br></div></div>
it should always be returned in registers where possible (and breaking<br>
ABI on all target platforms).  What about, for example, using named<br>
return value optimisation in this case to help improve the cost of<br>
returning on non-x86 architectures.<br>
<br>
Just throwing random thoughts out there.<br></blockquote><div><br></div><div>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).</div>
<div>Definitely no good for slices, and it doesn't help calls, only returns.</div><div><br></div>
<div>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.</div><div>Slices are fundamental to the language feature, they need to be efficient :/</div>
</div>