Article View: comp.arch
Article #101Re: What's wrong with stack machines?
From: Nick Janow
Date: Sat, 31 Oct 1992 07:10
Date: Sat, 31 Oct 1992 07:10
28 lines
1826 bytes
1826 bytes
prener@watson.ibm.com (Dan Prener) writes: > Properly implemented, either registers or a stack should be viewed as the > top of the memory hierarchy. Arguably, the greatest single performance > advantage from a memory hierarchy comes with re-use. Registers are better > for re-use, precisely because they don't require stack discipline. That depends on how you program. Programming with the intent of using a stack has many benefits, including speed and ease of programming. Saying that a stack machine is inferior to a register machine when using C programming techniques is circular logic. A stack language running on a stack machine is comparable if not superior (speed and ease of programming, as well as lower memory requirements) to C running on a C-optimized machine. > You have already argued that the problems of spilling registers and of > overflowing a stack are roughly the same. Given that, if you are offered > the choice of reaching the N elements only with stack discipline or with > random access, which would you choose? Probably the stack machine. I think that a stack can be implemented in less space, leaving more room for other speed enhancing techniques, or simply at higher speed (fewer switching elements and line lengths). Furthermore, the stack machine can operate faster, since you don't need to specify the operands with an instruction (it is part of the instruction). -- Nick_Janow@mindlink.bc.ca
Technical Details
Message-ID:
<16984@mindlink.bc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!rsoft!mindlink!a684Show Full Headers
Complete Article Headers
Newsgroups: comp.arch Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!agate!rsoft!mindlink!a684 From: Nick_Janow@mindlink.bc.ca (Nick Janow) Subject: Re: What's wrong with stack machines? Organization: MIND LINK! - British Columbia, Canada Date: Sat, 31 Oct 1992 07:10:38 GMT Message-ID: <16984@mindlink.bc.ca> Sender: news@deep.rsoft.bc.ca (Usenet) Lines: 28