Path: ...!eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: zbigniew2011@gmail.com (LIT) Newsgroups: comp.lang.forth Subject: Re: Stack vs stackless operation Date: Tue, 25 Feb 2025 14:44:17 +0000 Organization: novaBBS Message-ID: <925ae8e5dcef84bf1f465b367a6016e2@www.novabbs.com> References: <591e7bf58ebb1f90bd34fba20c730b83@www.novabbs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="1728872"; mail-complaints-to="usenet@i2pn2.org"; posting-account="ovTHZ/VLht/KDF1nKqB7PmGhjiyfUdv/DKd8kGKFjRY"; User-Agent: Rocksolid Light X-Rslight-Site: $2y$10$Q2ublZujFbIHoaTqjrws8.Qv/q8PqjJHoN9uhDUkN3qS.tfurNa1K X-Spam-Checker-Version: SpamAssassin 4.0.0 X-Rslight-Posting-User: 8e58c9b6d1da98b6162b84d03d2307a6516add15 Bytes: 2008 Lines: 25 > I have done some work on optimisation on ciforth. > This work has stalled, but the infamous byte prime benchmark, > was in the ballpark of swiftforth and mpeforth. > (Disingenuous, because this was the example I used.) > See https://home.hccnet.nl/a.w.m.van.der.horst/forthlecture5.html > This is about folding, a generalisation of constant folding. > This requires that you know the properties of the Forth Words, > i.e. that you can execute + at compile time, if the inputs > are constant. > [..] > Then I got stalled. I introduced complicated rules [..] This is more sophisticated way. My proposal is rather humble: a modest completion of Forth programming paradigm, from "every data goes through the stack" to "any data can go through the stack, still it's not strictly mandatory in every single case". Now I'm pondering about DO..LOOP construct; actually probably it doesn't necessarily need to rely on return stack. I wonder how much "lightweight" can loop become by rewriting it using OOS words. --