On Sun, 18 Dec 2011 20:33:22 +0100 Juan Jose Garcia-Ripoll <[email protected]> wrote:
> On Sun, Dec 18, 2011 at 8:09 PM, Matthew Mondor > <[email protected]>wrote: > > > If I remember SBCL inlines flet/labels by default, yet I'm unsure if > > this is always done or only for small functions, I assume the latter. > > > > I am not very keen on this, at least not with the current code, because > analyzing what is large and what not is a bit complicated and can only be > done in the second phase of the analysis -- when everything is stored as a > list of structures and the lisp code is no longer recognizable. It's also unclear for me at which OPTIMIZE SPEED level that takes place. But explicitely having to define functions to be inlined is no problem for me, just like I'm used to do with C and -O2 (gcc). Although the compiler, if properly tuned for an architecture (especially IRT to cache sizes), might do a better job at counting cycles, I think that a human generally knows pretty well what makes sense to inline explicitely. > In any case, if the FLET/LABELS function is small enough and is not closed > over variables, the C compiler will inline it most of the time. At least with -O3 (gcc), indeed. With -O3 the compiler has to know or assume cache sizes and take them into account (especially that it'll also try to unroll loops, not only inline functions), so for generic i686 code -O2 may be preferable, but ECL would have the same problem anyway, and unlike the C compiler, it wouldn't be able to properly evaluate when it's really worthwhile to inline/unroll... -- Matt ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ Ecls-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ecls-list
