|why not inline all functions? firstname.lastname@example.org (Mark Sanvitale) (1998-06-09)|
|Re: why not inline all functions? email@example.com (1998-06-11)|
|RE: why not inline all functions firstname.lastname@example.org (Quinn Tyler Jackson) (1998-06-19)|
|Re: why not inline all functions email@example.com (David Chase) (1998-06-19)|
|Re: why not inline all functions firstname.lastname@example.org (Dann Corbit) (1998-06-19)|
|From:||"Dann Corbit" <email@example.com>|
|Date:||19 Jun 1998 23:32:02 -0400|
|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: http://www.eskimo.com/~scs/C-faq/top.html
C-FAQ ftp: ftp://rtfm.mit.edu, 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]
Return to the
Search the comp.compilers archives again.