Hacker News new | ask | show | jobs
by IAmLiterallyAB 1698 days ago
The same (and more) stack space will be used if it was called as a regular function, whether that's preserving registers across the call boundary or simply running out of registers. So this shouldn't save any space, temporarily or otherwise.
1 comments

We’re not at all disagreeing. Calling vs inlining trades higher peak stack usage for (ideally) lower average stack usage.

Long running function calling short lived but high memory use function is a bad candidate for inlining because of that.