qaz@lemmy.world to Programmer Humor@lemmy.mlEnglish · 10 months agoWorse than single letterslemmy.worldimagemessage-square29fedilinkarrow-up1323arrow-down116
arrow-up1307arrow-down1imageWorse than single letterslemmy.worldqaz@lemmy.world to Programmer Humor@lemmy.mlEnglish · 10 months agomessage-square29fedilink
minus-squareschnurrito@discuss.tchncs.delinkfedilinkarrow-up30·10 months ago“result” is fine. That is the variable you will end up returning that you have to fill with stuff first. “data” on the other hand…
minus-squareHal_Canary@lemmy.sdf.orglinkfedilinkEnglisharrow-up5·10 months agoI came here to say this. Declare result in the first line of the function and return result is the last line. In C++, this is a big hint to the compiler that you want return value optimization to kick in.
“result” is fine. That is the variable you will end up returning that you have to fill with stuff first.
“data” on the other hand…
I came here to say this.
Declare
result
in the first line of the function andreturn result
is the last line. In C++, this is a big hint to the compiler that you want return value optimization to kick in.