|
|
|
|
|
by Spivak
1698 days ago
|
|
So this one is counterintuitive. You only spend stack space for local variables that don’t fit in registers. If you in-line a function with lots of local variables into a function with lots of local variables you use more stack space. And then that additional stack space can’t be reclaimed until the function it was inlined into returns. So it’s more stack space used temporarily but less used on average. |
|