Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Rod Pemberton Newsgroups: comp.lang.forth Subject: Re: Stack Sizes Date: Mon, 3 Oct 2016 23:40:46 -0400 Organization: Aioe.org NNTP Server Lines: 31 Message-ID: <20161003234046.3761250b@_> References: NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Newsreader: Claws Mail 3.13.1 (GTK+ 2.24.13; x86_64-unknown-linux-gnu) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:51592 On Mon, 3 Oct 2016 08:22:26 -0400 Walter Banks wrote: > I am currently working on a stack processor ISA. > > What better place to ask about stacks. Just over a year ago we had a discussion on stack size here. (See "Metrics on stack usage" on c.l.f. by Anton Ertl) > How many? single stack or two or three. You'll need one stack for C or two stacks for Forth. > What depth? You'll need about 32 for Forth at a minimum. > Why? Philip Koopman did a simulation of register spills versus stack size in 1990 for Forth. "The right answer, then, to how big stacks should be is 16 or 32 elements, no more" said Philip Koopman in "Design Tradeoffs in Stack Computers," Forth Dimensions, Volume 11 Number 6, March/April 1990. http://users.ece.cmu.edu/~koopman/forth/4thdim_11_6.pdf Rod Pemberton