Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!.POSTED!not-for-mail From: Walter Banks Newsgroups: comp.lang.forth Subject: Re: Metrics on stack usage Date: Wed, 17 Sep 2014 17:30:54 -0400 Organization: Aioe.org NNTP Server Lines: 20 Message-ID: <5419FD8E.D1CAEEE5@bytecraft.com> References: <541855C0.2558D27D@bytecraft.com> <541889C9.C49DBB52@bytecraft.com> NNTP-Posting-Host: 3UWArZOAzLnoO3sfAplcDA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Mailer: Mozilla 4.79 [en]C-CCK-MCD NSCPCD479 (Windows NT 5.0; U) X-Accept-Language: en X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:33407 "Elizabeth D. Rather" wrote: > > Well, using locals always costs in performance. Otherwise, the best > advice is to use variables for persistent values that need to be > accessed by multiple tasks or sections of the code, and the data stack > otherwise. And arrays for arrays, of course. You have made two comments about locals. I am assuming the reference is to locals that kept on the stack as opposed to local variables that have local scoping and can be re-allocated by the compiler when the space is out of scope. Stack locals are computationally expensive. In generic languages scoped locals (re)using ram space not so much. w..