Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #45029

Re: Stack space size

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Stack space size
Date 2016-01-22 15:31 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2016Jan22.163111@mips.complang.tuwien.ac.at> (permalink)
References <ff9ea42c-37b1-496c-9bad-449ca7805010@googlegroups.com>

Show all headers | View raw


Brad Eckert <hwfwguy@gmail.com> writes:
>Metrics in Phil Koopman's Stack Machines book indicate that 32-cell data an=
>d return stacks handle whatever you throw at them, in general.

The data for my first stack caching paper
<https://www.complang.tuwien.ac.at/misc/stack-caching-data/> show that
for these non-embedded programs 32 registers are almost, but not quite
enough.

compile: 32 cells: 6 loads, 3 stores, 93 moves, 9 updates
cross:   31 cells: 3 loads, 0 stores, 0 moves, 3 updates
gray:    32 cells: 42 loads, 39 stores, 1187 moves, 81 updates
prims2x: 32 cells: 12 loads, 9 stores, 278 moves, 21 updates

These are data for stack caches: if we have an n-cell stack cache, how
many loads from main memory, stores to main memory, moves between
stack cache elements, and stack pointer updates remain.

I.e., for cross 31 registers are sufficient, for compile 32 are almost
sufficient, prims2x probably needs a few more, and gray probably yet
more (or maybe they all need just a few more, and gray yo-yos much
more than the others).

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2015: http://www.rigwit.co.uk/EuroForth2015/

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Stack space size Brad Eckert <hwfwguy@gmail.com> - 2016-01-21 21:50 -0800
  Re: Stack space size hughaguilar96@gmail.com - 2016-01-21 22:00 -0800
  Re: Stack space size Raimond Dragomir <raimond.dragomir@gmail.com> - 2016-01-21 22:30 -0800
    Small strings as ints Ron Aaron <rambamist@gmail.com> - 2016-01-22 08:41 +0200
      Re: Small strings as ints Raimond Dragomir <raimond.dragomir@gmail.com> - 2016-01-21 23:41 -0800
        Re: Small strings as ints Ron Aaron <rambamist@gmail.com> - 2016-01-22 09:50 +0200
      Re: Small strings as ints Ron Aaron <rambamist@gmail.com> - 2016-01-24 07:15 +0200
  Re: Stack space size anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-22 15:31 +0000
  Re: Stack space size Rod Pemberton <NoHaveNotOne@bcczxcfre.cmm> - 2016-01-22 17:10 -0500
    Re: Stack space size Coos Haak <chforth@hccnet.nl> - 2016-01-22 23:21 +0100
      Re: Stack space size "Elizabeth D. Rather" <erather@forth.com> - 2016-01-22 13:28 -1000
        Re: Stack space size hughaguilar96@gmail.com - 2016-01-25 21:23 -0800
    Re: Stack space size "HAA" <someone@microsoft.com> - 2016-01-24 00:08 +1100
    Re: Stack space size anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-01-26 16:23 +0000

csiph-web