Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: Walter Banks Newsgroups: comp.lang.forth Subject: Re: Metrics on stack usage Date: Mon, 22 Sep 2014 10:48:07 -0400 Organization: Aioe.org NNTP Server Lines: 38 Message-ID: <542036A7.FFCE36C8@bytecraft.com> References: <541855C0.2558D27D@bytecraft.com> <7xmw9zletd.fsf@ruckus.brouhaha.com> <541891FE.9157C03@bytecraft.com> <7xoaufyxch.fsf@ruckus.brouhaha.com> <541C11C5.5AD2C7E0@bytecraft.com> <541C3737.EC861D30@bytecraft.com> <7xvbojzn7e.fsf@ruckus.brouhaha.com> NNTP-Posting-Host: WS9whZ/ot+e+Q+IoL9T/mw.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:33508 Paul Rubin wrote: > Walter Banks writes: > > An additional comment. The Mill project effectively does something > > similar to a circular stack with its moving stack. > > I think of Mill as an unusual register machine rather than a stack > machine, since the "belt" requires random access. GA-style stack > machines don't have any way to access the stack interior, which > simplifies the hardware (no bypass network, if I'm using the term > correctly: ALU inputs are always the two registers TOS and NOS) and > makes it possible to run at very high frequencies on older processes > (the GA is 700 mhz on 0.18 micron cmos). > > The circular stack "feature" of letting you fill the stack with a > constant and then have an endless supply of that constant doesn't seem > so useful, but you can save a few program bytes by not having to clean > up old stack debris in some situations. > > Chlorophyll has a fair amount of unusual compiler technology so > I thought you might like the paper. I did a quick code generator for a mill type architecture and found no real advantage over writing code for a general purpose micro. The ISA is more complex (not as bit efficient) and stack offset calculations are potentially more hardware expensive. An alternative circular stack design that stores variables in ram space and the code generator that tracks addressing does marginally better. The Chlorophyll paper was an interesting read. w..