> (mod-expt-mults signing-exponent) 984The dramatic speedup is due to the fact that at each step mod-expt divides the exponent in half.
Q: If e is the exponent, then how is the number of multiplications expressed in big-Theta notation?
A: Θ(log e) instead of Θ(e)
mod-expt is now an example of logarithmic recursion (instead of linear recursion).
Q: How is the amount of memory required by mod-expt expressed in big-Theta notation?
A: Θ(log e)