Re: Stack based-Register Based

anton@mips.complang.tuwien.ac.at (Anton Ertl)
4 Feb 2001 22:16:40 -0500

          From comp.compilers

Related articles
[4 earlier articles]
Re: Stack based-Register Based peter_flass@yahoo.com (2001-01-26)
Re: Stack based-Register Based andrewb@votehere.net (Andrew Berg) (2001-01-28)
Re: Stack based-Register Based rog@vitanuova.com (2001-02-01)
Re: Stack based-Register Based ucapjab@ucl.ac.uk (Jonathan Barker) (2001-02-01)
Re: Stack based-Register Based rpw3@rigden.engr.sgi.com (2001-02-04)
Re: Stack based-Register Based Martin.Ward@durham.ac.uk (2001-02-04)
Re: Stack based-Register Based anton@mips.complang.tuwien.ac.at (2001-02-04)
Re: Stack based-Register Based anton@mips.complang.tuwien.ac.at (2001-02-04)
Re: Stack based-Register Based joachim_d@gmx.de (Joachim Durchholz) (2001-02-15)
Re: Stack based-Register Based joachim_d@gmx.de (Joachim Durchholz) (2001-02-25)
Re: Stack based-Register Based joachim_d@gmx.de (Joachim Durchholz) (2001-02-25)
Re: Stack based-Register Based henry@spsystems.net (2001-02-25)
Re: Stack based-Register Based ndalton@ics.uci.edu (Niall Dalton) (2001-03-01)
| List of all articles for this month |

From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.java.machine,comp.compilers
Followup-To: comp.compilers
Date: 4 Feb 2001 22:16:40 -0500
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 01-01-124 01-01-136 01-02-010
Keywords: architecture, interpreter
Posted-Date: 04 Feb 2001 22:16:40 EST

  rog@vitanuova.com (Roger PeppĂ©) writes:
>> The JVM was first implemented in an interpreter, and that has probably
>> influenced the design; for interpreters stack machines are a good
>> choice (see my posting in the "Interpreter design" thread in
>> comp.compilers).
>
>For an alternative view, see "The Design of the Inferno virtual machine"
>by Phil Winterbottom and Rob Pike, an HTML version of which can be
>found at:
>
> http://www.vitanuova.com/papers/hotchips.html


"The requested URL /papers/hotchips.html was not found on this server."


But I found a paper with the same title and authors at
http://www.cs.bell-labs.com/cm/cs/who/rob/hotchips.html


They claim (based on one very basic example) that an interpreter for
their Dis VM (a three-address memory-to-memory machine) has less
memory traffic than a stack-based VM, but then also mention the
additional decoding time needed for the inline arguments of their VM.
In any case, the additional memory traffic of a stack machine is in
cache and does not cost much more than other instructions, so memory
references is not a good metric for speed (mispredicted indirect jumps
from instruction dispatches are much more significant).


They also claim that this VM is a close match to the architecture of
existing processors. The only architecture I know that might fit is
the VAX, and it's dead. Everything else is just as far away from a
three-address memory machine as from a stack machine (i.e., not very
far when it comes to implementing a translator or interpreter).


They also claim that the JIT for a memory machine can be
"substantially simpler and faster" than the JIT for a stack machine.
I very much doubt that, since translating simple stack code with
static stack effects (as required by the JVM) is very simple (the JVM
has some other features that cost some time and complexity, though).


Another claim is that the memory machine architecture makes reference
counting more feasible, and therefore requires less memory. I am not
familiar enough with reference counting to comment on this.


Followups to comp.compilers


- anton
--
M. Anton Ertl Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.