Hacker News new | ask | show | jobs
by carlos-menezes 432 days ago
C++ for reference: https://godbolt.org/z/7G6qxK6T8
1 comments

Try compiling with optimizations. I think by default this site doesn't add optimization flags.

Here what happens with optimizations: https://godbolt.org/z/G18zd7chP

Look at the registers usages vs stack

Got it! Thanks for the link.