Scribe icon indicating copy to clipboard operation
Scribe copied to clipboard

Before expensive loops, push stack vars to memory

Open ControlCplusControlV opened this issue 3 years ago • 1 comments

ControlCplusControlV avatar Dec 17 '22 22:12 ControlCplusControlV

Before expensive loops, push stack vars to memory

Instead of trying to fix the stack at the end of every iteration, to be the same as before, we could just shift everything to memory when a loop is expensive enough. This wouldn't make sense for branches that run once like an if statement or switch, but for loops should probably always do this, unless w/ the dynamic programming thing above we can find a stack order that would eliminate the need to re-order the stack after every loop.

ControlCplusControlV avatar Dec 17 '22 22:12 ControlCplusControlV