I could have pushed onto the stack exactly that control information which I deemed necessary. These transformations were also presented in my Programming Languages course. Unfortunately, at the time that I did my Algorithms project, I did not yet grasp them well enough to use them well. What I learned most from this experience was the importance of a structured, systematic approach to programming. Real efficiency comes from elegant solutions, not optimized programs.
Optimization is always just a few correctness-preserving transformations away.