Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!liberte From: liberte@m.cs.uiuc.edu Newsgroups: comp.emacs Subject: Re: Summing Columns Message-ID: <4300040@m.cs.uiuc.edu> Date: 22 Mar 89 05:07:00 GMT References: <5158@xenna.Encore.COM> Lines: 25 Nf-ID: #R:xenna.Encore.COM:5158:m.cs.uiuc.edu:4300040:000:962 Nf-From: m.cs.uiuc.edu!liberte Mar 21 23:07:00 1989 > /* Written 6:40 pm Mar 20, 1989 by bard@THEORY.LCS.MIT.EDU in m.cs.uiuc.edu:comp.emacs */ > (2) eta-reducing the '(lambda (x) (string-to-int x)) into > (function string-to-int). (function is like quote, but > possibly better for the compiler.) Using (function string-to-int) causes the byte-compiler to generate byte-code that dereferences the function cell of 'string-to-int. But since application of this function also causes dereferencing of the symbol - but in C code - I would expect that it is faster to let the C code to it. Therefore, (function string-to-int) would be slightly *slower* than 'string-to-int in byte-code. Where the function special form is useful is in things like: (function (lambda (x) (foo (bar x)))) This allows the byte-compiler to byte compile the lambda expression since it is expected to be used as a function. Dan LaLiberte uiucdcs!liberte liberte@cs.uiuc.edu liberte%a.cs.uiuc.edu@uiucvmd.bitnet