Related articles |
---|
When/why did function calls get cheap? peter@javamonkey.com (Peter Seibel) (2003-02-12) |
Re: When/why did function calls get cheap? strohm@airmail.net (John R. Strohm) (2003-02-13) |
Re: When/why did function calls get cheap? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2003-02-13) |
Re: When/why did function calls get cheap? bje@redhat.com (Ben Elliston) (2003-02-21) |
Re: When/why did function calls get cheap? joachim_d@gmx.de (Joachim Durchholz) (2003-02-21) |
Re: When/why did function calls get cheap? marcov@toad.stack.nl (Marco van de Voort) (2003-02-21) |
Re: When/why did function calls get cheap? firefly@diku.dk (Peter Finderup Lund) (2003-02-21) |
Re: When/why did function calls get cheap? firefly@diku.dk (Peter Finderup Lund) (2003-02-21) |
[15 later articles] |
From: | "John R. Strohm" <strohm@airmail.net> |
Newsgroups: | comp.compilers |
Date: | 13 Feb 2003 00:48:37 -0500 |
Organization: | Compilers Central |
References: | 03-02-073 |
Keywords: | performance, history |
Posted-Date: | 13 Feb 2003 00:48:37 EST |
Peter Seibel asks "When/why did function calls get cheap?"
Actually, it happened 25 years ago.
==========================================
AIM-443
Author[s]: Guy Lewis Steele, Jr.
Debunking the 'Expensive Procedure Call' Myth, or, Procedure Call
Implementations Considered Harmful, or, Lambda: The Ultimate GOTO
October 1977
ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-443.ps
ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-443.pdf
Folklore states that GOTO statements are 'cheap', while procedure
calls are 'expensive'. This myth is largely a result of poorly
designed language implementations. The historical growth of this myth
is considered. Both theoretical ideas and an existing implementation
are discussed which debunk this myth. It is shown that the
unrestricted use of procedure calls permits great stylistic
freedom. In particular, any flowchart can be written as a 'structured'
program without introducing extra variables. The difficulty with the
GOTO statement and the procedure call is characterized as a conflict
between abstract programming concepts and concrete language
constructs.
==========================================
This paper is admittedly LISP-centric, but the point remains the same.
Function calls aren't that expensive. They are becoming more
expensive nowadays, because of the cost of cache misses on processors
with horrendously long pipelines and superscalar execution and all
that stuff.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.