On 2025-02-17 10:41 a.m., Chuck Guzis via cctalk wrote:
While a hardware stack may be useful, I don't consider it to be
essential and perhaps counter-productive. (dodging brickbats).
A jump to subroutine is convenient , but could be omitted.
I say that because if a recursive solution to a
problem is available on
a stack-oriented architecture, the natural impulse is to program a
recursive solution. Lack of hardware support for recursion might
otherwise push one toward an iterative approach, which in many cases can
perform better.
A recursive solution is fine, if you have bounds checking on the calls.
On a iterative approach, one can recover from bad input.
--Chuck
Ben.