I'm a student, new to scheme language. I'm trying to write efficient functions. I already know how to calculate the execution time of a function, but what I'd like to know is how to calculate the stack(or memory) utilization of this function. Because as I know, the less number of instructions waiting on the stack during the execution the better efficiency gets.
so is there a way to count the number of instructions waiting on the stack?