hal_canary

joined 1 year ago
[–] [email protected] 5 points 11 months ago

I 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.