When/why did function calls get cheap?

Peter Seibel <peter@javamonkey.com>
12 Feb 2003 13:43:31 -0500

          From comp.compilers

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)
[16 later articles]
| List of all articles for this month |
From: Peter Seibel <peter@javamonkey.com>
Newsgroups: comp.compilers
Date: 12 Feb 2003 13:43:31 -0500
Organization: Prodigy Internet http://www.prodigy.com
Keywords: history, performance
Posted-Date: 12 Feb 2003 13:43:31 EST

My understanding is that in Olden Times, Real Programmers avoided
using lots of small functions because the overhead of a function call
was considered high. But then, somewhere along the way, the compiler
writers got clever and made function calls cheap so now nobody worries
about it. Is that more or less correct? And if so, what happened to
make function calls cheap. It seems that there's a non-trivial amount
of work to do to set up a stack frame, etc. compared to just
continuing along in a straight line processing instructions that do
the actual work--are there deep black-magic optimizations or did the
relative costs of something change or something else entirely?


-Peter
--
Peter Seibel
peter@javamonkey.com
[Computers got faster, compilers and programmers learned how to expand
small (and sometimes not so small) functions in-line. -John]



Post a followup to this message

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