|the Evil Effects of Inlining firstname.lastname@example.org (1991-05-02)|
|Re: the Evil Effects of Inlining email@example.com (1991-05-03)|
|Re: the Evil Effects of Inlining daniel@quilty.Stanford.EDU (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-03)|
|Re: the Evil Effects of Inlining firstname.lastname@example.org (1991-05-04)|
|Re: the Evil Effects of Inlining email@example.com (1991-05-05)|
|Re: the Evil Effects of Inlining firstname.lastname@example.org (1991-05-05)|
|[2 later articles]|
|From:||email@example.com (John Gateley)|
|In-Reply-To:||firstname.lastname@example.org's message of 2 May 91 18:05:20 GMT|
|Keywords:||Lisp, design, optimize|
|References:||<9104262025.AA21840@enuxva.eas.asu.edu> <email@example.com> <1991May1.firstname.lastname@example.org> <1991May2.email@example.com>|
|Date:||Fri, 03 May 91 20:07:39 GMT|
In article <1991May2.firstname.lastname@example.org> email@example.com (Preston Briggs) writes:
firstname.lastname@example.org (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.