Related articles |
---|
why not inline all functions? sanvitam@std.teradyne.com (Mark Sanvitale) (1998-06-09) |
Re: why not inline all functions? cliff.click@Eng.Sun.COM (Clifford Click) (1998-06-11) |
Re: why not inline all functions? p.toland@computer.org (Phillip Toland) (1998-06-11) |
Re: why not inline all functions? f81@ix.urz.uni-heidelberg.de (Joerg Schoen) (1998-06-11) |
Re: why not inline all functions? bje@cygnus.com (Ben Elliston) (1998-06-11) |
Re: why not inline all functions? ayers@incert.com (Andy Ayers) (1998-06-11) |
Re: why not inline all functions? mcdirmid@beaver.cs.washington.edu (1998-06-11) |
Re: why not inline all functions? portland@uswest.net (Thomas Niemann) (1998-06-11) |
Re: why not inline all functions? wclodius@aol.com (1998-06-11) |
[2 later articles] |
From: | "Phillip Toland" <p.toland@computer.org> |
Newsgroups: | comp.compilers |
Date: | 11 Jun 1998 16:10:19 -0400 |
Organization: | epix Internet Services |
References: | 98-06-032 |
Keywords: | optimize, practice |
The Microsoft Visual C/C++ compiler has two levels of optimization WRT
inline functions: "inline only functions marked with __inline" and "inline
any suitable function". As I understand it, the compiler uses complicated
hueristics to determine if it is worthwhile to inline a function. It will
look at things like the size of the function and how many times it is
called.
--Phil
p.toland@computer.org
Mark Sanvitale wrote in message 98-06-032...
>Perhaps compilers already take advantage of the idea I have outlined or
>perhaps there are some problems with the idea which I don't know about
>(an old C++ book I have says, "Compiler limits prevent complicated
>functions from being inlined," but no further explanation is given.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.