Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!tank!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!uicslsv!bharat From: bharat@uicslsv.cs.uiuc.edu Newsgroups: comp.lang.lisp Subject: LET vs. &aux Message-ID: <4400007@uicslsv> Date: 18 Dec 88 04:29:00 GMT Lines: 23 Nf-ID: #N:uicslsv:4400007:000:1038 Nf-From: uicslsv.cs.uiuc.edu!bharat Dec 17 22:29:00 1988 I am concerned with the relative efficiencies of using &aux and let for using local variables (I usually use whichever seems to be more aesthetically appropriate), but here are my opinions. There should be little or no difference; however counterintuitively the let block seems to be better in the case where the local is accessed very often. The &aux var. is (probably) affixed to the (end of) the binding list. References to it within another lexical construct (say I am using both a let and &aux) would probably have to assoc through the bindings, while the let variables would be defined in the lexical block. So I conclude that if you are going to use a let at the top level anyway, it is probably more efficient to put all your local vars in the let, rather than &auxing them. Who am I kidding anyway - the short binding lists (with max 10-12 variables - local and otherwise) probably cause no appreciable difference. Any comments? Also what if I did &aux, followed by a setq (not within the variable defn.) - which is better?