|the Evil Effects of Inlining email@example.com (1991-05-02)|
|Re: the Evil Effects of Inlining firstname.lastname@example.org (1991-05-03)|
|Re: the Evil Effects of Inlining daniel@quilty.Stanford.EDU (1991-05-03)|
|Re: the Evil Effects of Inlining email@example.com (1991-05-03)|
|Re: the Evil Effects of Inlining firstname.lastname@example.org (1991-05-03)|
|Re: the Evil Effects of Inlining email@example.com (1991-05-03)|
|Re: the Evil Effects of Inlining firstname.lastname@example.org (1991-05-03)|
|Re: the Evil Effects of Inlining email@example.com (1991-05-04)|
|Re: the Evil Effects of Inlining firstname.lastname@example.org (1991-05-05)|
|Re: the Evil Effects of Inlining email@example.com (1991-05-05)|
|[2 later articles]|
|From:||firstname.lastname@example.org (John Gateley)|
|In-Reply-To:||email@example.com's message of 2 May 91 18:05:20 GMT|
|Keywords:||Lisp, design, optimize|
|References:||<9104262025.AA21840@enuxva.eas.asu.edu> <firstname.lastname@example.org> <1991May1.email@example.com> <1991May2.firstname.lastname@example.org>|
|Date:||Fri, 03 May 91 20:07:39 GMT|
In article <1991May2.email@example.com> firstname.lastname@example.org (Preston Briggs) writes:
email@example.com (Gregory Carter) writes:
[wondering about inlining the world]
Don't forget to be careful of recursion!
Homework assignment: figure out how to inline with recursion (Yes, I
did it. Turned out to be pretty neat :^).
and the moderator notes
>[GCC and some other C compilers permit you do declare a procedure "inline"
>so that it is expanded wherever it is called. That gives pretty much the
>same effect, faster but larger code. -John]
Locally, we're pretty down on naive inlining. I think there are some
cases where it pays, but they are much rarer than imagined. So, here's a
list of reasons not to inline:
I have found several places where inlining is very useful, but they all
seem to be in the Lisp world. In the compiler (for CL/Scheme) I worked on
we used inlining quite heavily to optimize the language runtimes. However,
we were careful about it - we would only inline a procedure if it didn't
cause code explosion or if there was some reason the extra code would get
folded away. For example, if we saw an "aref" call (CL's general purpose
array reference) and we could determine that the argument was a simple
vector, we would fold it away producing a simple vector ref. We didn't
just blindly inline the whole mess (which was 50-100 lines of code) and
hope that it would go away.
Return to the
Search the comp.compilers archives again.