Re: When/why did function calls get cheap?

Peter Finderup Lund <firefly@diku.dk>
9 Mar 2003 17:12:08 -0500

          From comp.compilers

Related articles
[8 earlier articles]
Re: When/why did function calls get cheap? anton@mips.complang.tuwien.ac.at (2003-02-21)
Re: When/why did function calls get cheap? jplevyak@yahoo.com (John Plevyak) (2003-02-21)
Re: When/why did function calls get cheap? {spamtrap}@qeng-ho.org (Arthur Chance) (2003-02-24)
Re: When/why did function calls get cheap? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2003-02-24)
Re: When/why did function calls get cheap? alexc@std.com (Alex Colvin) (2003-02-24)
Re: When/why did function calls get cheap? vbdis@aol.com (2003-02-24)
Re: When/why did function calls get cheap? firefly@diku.dk (Peter Finderup Lund) (2003-03-09)
Re: When/why did function calls get cheap? joachim_d@gmx.de (Joachim Durchholz) (2003-03-09)
Re: When/why did function calls get cheap? klimas@klimas-consulting.com (Andreas Klimas) (2003-03-09)
Re: When/why did function calls get cheap? bonzini@gnu.org (2003-03-14)
Re: When/why did function calls get cheap? jcrens@earthlink.net (Jack Crenshaw) (2003-03-14)
Re: When/why did function calls get cheap? david.thompson1@worldnet.att.net (David Thompson) (2003-03-22)
Re: When/why did function calls get cheap? alex_mcd@btopenworld.com (Alex McDonald) (2003-03-22)
[2 later articles]
| List of all articles for this month |
From: Peter Finderup Lund <firefly@diku.dk>
Newsgroups: comp.compilers
Date: 9 Mar 2003 17:12:08 -0500
Organization: Department of Computer Science, University of Copenhagen
References: 03-02-073 03-02-101 03-02-134
Keywords: architecture, performance
Posted-Date: 09 Mar 2003 17:12:08 EST

On Mon, 24 Feb 2003, Arthur Chance wrote:


> Peter Finderup Lund <firefly@diku.dk> writes:
> > The implementations of the ISAs has also improved: many provide an
> > internal, hidden return stack so all calls and returns are correctly
> > predicted (unless you try to play tricks and don't match them up).
>
> Wouldn't this foul up continuation passing style compilation
> techniques?


They don't call -- they jump. The fancy thing about CPS is that you
get rid of some special cases: you don't have to handle things
differently for tail calls and ordinary calls (in principle) because
both are just parameter passing andjumps. You also don't have to
handle both a stack and a heap -- you can easily make do with only a
heap (SML/NJ does that).


> Which ISAs do you have in mind?


IA-32 and Alpha, for example. Even my lowly K6-2 has such a return stack
internally to predict where to return to.




-Peter


Post a followup to this message

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