Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!cernvax!chx400!ethz!neptune!inf.ethz.ch!brandis From: brandis@inf.ethz.ch (Marc Brandis) Newsgroups: comp.arch Subject: Re: Optimal Computer Architectures Message-ID: <14652@neptune.inf.ethz.ch> Date: 15 Nov 90 10:03:27 GMT References: <1990Nov8> <3300209@m.cs.uiuc.edu> <8662@scolex.sco.COM> <1990Nov12.054723.18015@actrix.co.nz> Sender: news@neptune.inf.ethz.ch Reply-To: brandis@inf.ethz.ch (Marc Brandis) Organization: Departement Informatik, ETH, Zurich Lines: 28 In article <1990Nov12.054723.18015@actrix.co.nz> Bruce.Hoult@actrix.co.nz (Bruce Hoult) writes: >>More to the point, *any* processor with register windows is not going >>to do too well on deeply recursive code. > >I don't know much about this, but it seems to me that a machine without >register windows is oiggoing to have to put those values on the stack >in any case. A machine with lots of registers that have to be stored When you look at typical recursive procedures, you will notice that they have very often only a small number of local variables, that can be held in registers. In an architecture with register windows, a trap occurs on stack underflow or overflow and causes the register windows to be dumped to memory. Most of the time, too much is stored and restored. In an architecture without register windows, a smart compiler can remove much of this overhead. There are also quite a lot of cases, where recursive procedures use variables in one path through the procedure but not in another. In this case it may be better to have the variables in memory anyway, so nothing would have to be stored at all. (* I speak only for myself. Marc-Michael Brandis, Institut fuer Computersysteme, ETH-Zentrum CH-8092 Zurich email: brandis@inf.ethz.ch brandis@iis.ethz.ch *)