Re: why not inline all functions

"Dann Corbit" <>
19 Jun 1998 23:32:02 -0400

          From comp.compilers

Related articles
why not inline all functions? (Mark Sanvitale) (1998-06-09)
Re: why not inline all functions? (1998-06-11)
RE: why not inline all functions (Quinn Tyler Jackson) (1998-06-19)
Re: why not inline all functions (David Chase) (1998-06-19)
Re: why not inline all functions (Dann Corbit) (1998-06-19)
| List of all articles for this month |

From: "Dann Corbit" <>
Newsgroups: comp.compilers
Date: 19 Jun 1998 23:32:02 -0400
Organization: PSINet
References: 98-06-032 98-06-063 98-06-110 98-06-114
Keywords: optimize, practice, comment

A short time ago on news:comp.lang.c I posted a trivial example that is not
recursive and cannot be inlined without turning the whole planet into
silicon chips. In other words, in a general sense, the task is impossible.

More importantly, for any CPU there will be a crossover point where further
inlines make things slower, not faster.
Hypertext C-FAQ:
C-FAQ ftp:, C-FAQ Book: ISBN 0-201-84519-9
Try "C Programming: A Modern Approach" ISBN 0-393-96945-2
[His example was a straightforward set of nested calls which would
balloon to 25! instances of the lowest level call if inlined. Even if
not inlined, the lowest level routine still would be called 25! times,
which is too many, but his point is well taken that a couple of levels
of nested inlining can produce impressive code bloat. -John]

Post a followup to this message

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