3 ms·
Eliminating the call stack to save RAM
- DarkShikari 17y agoThis technique is as old as handwritten assembly and anyone who has done significant assembly coding has probably done it at some point whether they realize it or not. What's interesting and new (and presented in this paper) is automating this concept in a compiler.
- owinebarger 17y agoNot really. The flattening part is old hat in functional languages, though this particular formulation is restricted to the special case of "non-recursive" functions. I don't know about the particular optimizations they apply to the flattened code.
- wlievens 17y agoA compiler I worked on actually did this for all function calls. With recursion impossible (and whole-program compilation mandatory), huge gains can be made. And that compiler is used for pretty significant applications. Odds are many posters here have its microcode in their pocket.
- mey 17y agoHow is this different then the concept of "inline" in C/C++?
- s800 17y agoMaybe we should pass parameters in registers... :-)
- teeja 17y agoHe he. When I read 'jump' I tend to think of that "G-word" that people argue about so much. Then I think of the old saw, "Rules are made to be broken."