← Back to team overview

kicad-developers team mailing list archive

Just out of curiosity - tested return value optimization


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.

Lorenzo Marcantonio
Logos Srl

Follow ups