Skip to content

How Function Return Values Get Back: From rax to Return Value Optimization ​

A return statement looks like one line of source; underneath it there are three routes: rax, a hidden pointer, and RVO. This topic measures when each route triggers and what it looks like in assembly, so after reading you can judge which route a large object will take.

pdf-latest-41-gc317b3f · c317b3f · 2026-10-24