Sujet : Re: Avoid treating the stack as an array [Re: "Back & Forth" is back!]
De : no.email (at) *nospam* nospam.invalid (Paul Rubin)
Groupes : comp.lang.forthDate : 15. Sep 2024, 20:39:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87seu01zbj.fsf@nightsong.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
So by keeping the values on the stack you not just eliminate their
repeated mention, but also eliminate one branch of the IF.
Is the repeated mention just a matter of DRY, assuming the compiler puts
the locals in registers so that the extra mention doesn't transfer them
between stacks a second time? I do prefer your version where you factor
out VIERROR.
I wonder whether Moore's 1999 aversion to locals had something to do
with his hardware designs of that era, where having more registers
(besides T and N) connected to the ALU would have cost silicon and
created timing bottlenecks. Today's mainstream processors have GPR's
anyway, but I wonder what the real problem was with stack caches like
the CRISP:
https://thechipletter.substack.com/p/at-and-ts-crisp-hobbitsCommenters there say CRISP failed basically because its early
implementation was buggy, it lost an important design win because of the
bugs, and AT&T management then gave up on it.
I remember the SPARC had "register windows" but I don't know if that's
similar or what went wrong with them.