Re:Forth vs Lisp
by kazinator on Wednesday November 17, 2021 @06:10PM
(#29260085)
Probably, if you're doing complex calculations with Forth that have many operands, you should favor left-reductions: reducing the stack should be as eager as possible. Don't pile all the operands into the stack all at once followed by a soup of words to decimate them. The code generation algorithm should be: whenever you write down an operand to be pushed into the stack, then if a reduction is thereby made possible, you should add the word to achieve that reduction.
[ Parent
| on HN ]
There are no comments on this comment yet.