Sujet : Re: Avoid treating the stack as an array [Re: "Back & Forth" is back!]
De : stephen (at) *nospam* vfxforth.com (Stephen Pelc)
Groupes : comp.lang.forthDate : 08. Sep 2024, 15:56:01
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vbkdu0$1v8lq$1@dont-email.me>
References : 1 2 3 4
User-Agent : Usenapp for MacOS
On 6 Sep 2024 at 23:03:38 CEST, "Buzz McCool" <
buzz_mccool@yahoo.com> wrote:
Would you have any videos talking about Forth locals? You and dxf are
far more adept at stack manipulations than I. I'm thinking I can get a
word up and working with locals and then convert to manual stack
manipulations afterwards if necessary.
Don't. You will only become dependent on locals. Use of locals should
be a considered decision.
When is it necessary? dxf showed a word w/o locals to have ~%30 fewer
instructions than a word with locals. Is that a common occurrence?
We (MPE) converted much of our TCP/IP stack not to use locals. This
was mostly on ARM7 devices, but the figures for other 32 bit CPUs of
the period (say 15 years ago) were similar. Code density improved by
about 25% and performance by about 50%.
Stephen
-- Stephen Pelc, stephen@vfxforth.comMicroProcessor Engineering, Ltd. - More Real, Less Time133 Hill Lane, Southampton SO15 5AF, Englandtel: +44 (0)78 0390 3612, +34 649 662 974http://www.mpeforth.com MPE website
http://www.vfxforth.com/downloads/VfxCommunity/ downloads