kicad-developers team mailing list archive
Mailing list archive
Re: Just out of curiosity - tested return value optimization
On 04/30/2012 02:14 AM, Lorenzo Marcantonio wrote:
> I tried to look at the generated code (returning 'by value' a DPOINT).
> Don't ask me how it decides it can be done but g++ on x64 handles back the DPOINT in *two registers*. Maybe it can because x64 has more registers and the DPOINT is inline (a template in fact). This when it doesn't inline the whole function call!
> Just to say that's actually the same thing, no overhead in this kind of return by value.
There was a certain amount of faith all along, that a compiler with this much experience
into it might do the right thing.