Hal_Canary@lemmy.sdf.orgtoProgrammer Humor@lemmy.ml•FizzBuzz: Enterprise EditionEnglish
1·
2 years agoThis makes me cry.
https://halcanary.org/ https://mastodon.sdf.org/@hal_canary/ https://twitter.com/halcanary https://www.reddit.com/user/hwc PGP Key: 9E4B56B252BA5544135A6146BDA20B3DBAF71EE3
This makes me cry.
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.