Page 1 of 1
stack machine vs register-based machine
Posted: Fri Feb 15, 2008 10:25 pm
by binutils
which one you alike?
or is there something others?
--
PS:
http://www.youtube.com/watch?v=Komseiqp1DQ :)
Posted: Sun Feb 17, 2008 6:20 pm
by iammisc
register-based machines because they are easier to JIT compile.
Posted: Sun Feb 17, 2008 6:41 pm
by Combuster
IMHO, its really a matter of personal preference.
Posted: Tue Feb 19, 2008 12:35 pm
by DeletedAccount
Just FYI ... The .Net framework essentially uses a stack based machine ...atleast the IL code it generates assumes more or less a stack machine
I think Java VM does the same (sorry i have no clue on this ..
) ....
@ mods : I planning to write a tutorial on programming using IL ... Is this info
helpful for osdevelopers ...??? (May be ) .... It is certainly useful for compiler developers
Posted: Tue Feb 19, 2008 12:59 pm
by JamesM
Hi,
Register based machines really flourished with the IBM system/360, eons ago. As far as I can recall from my lectures, the main problem with stack machines at the time was the increased number of instructions required to do the same task as a register machine tended to choke the frontside bus a little, causing performance degradation.
Nowadays, the FSB is less of a performance bottleneck, and certain groups (including Chris Bailey, head of the Amadeus group based at York university, UK) have been looking into the possibility of reinventing stack machines for a new age. They believe the the bottlenecks have now moved elsewhere, and stack machines may again be the better beast.
As mentioned, the .NET runtime uses a stack based virtual machine, as does the Java runtime. In fact, one of the aims of the above project is to construct a native Java processor (or similar).
Until then, however, register based machines are still the de-facto standard. I would be interested to see what Brendan has to say on this (he seems extremely knowledgeable on matters such as this).
Cheers,
James