From ... From: Erik Naggum Subject: Re: basic question (probably w/ no good answer) Date: 2000/04/08 Message-ID: <3164210231625803@naggum.no>#1/1 X-Deja-AN: 608476901 References: mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 955225908 13113 195.0.192.66 (8 Apr 2000 20:31:48 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 8 Apr 2000 20:31:48 GMT Newsgroups: comp.lang.lisp * Joe Marshall | The time you might `save' in compilation is negligable, a decent compiler | would produce similar code in either case, even if the code were | different, I can't imagine it would be so different as to have a | noticable impact on performance or code size, and if it *really* made a | noticable difference, I'd imagine that the compiler would be so piss-poor | as to be virtually unusable. I think "helping the compiler" (not expressed in so many words, but in meaning) is a metaphor that relates to the "sufficiently smart compiler", and that it is not directly related to any actual assistance. it's more like "would it hamper the smart compiler's ability to be as smart as it could be", or, as David put it "do the right thing". I don't think so, but it's a good question, nonetheless. Rob pointed out that releasing the hold on the objects might help (again, metaphorically) the garbage collector pick up dead objects earlier, although it is hard for me right now to imagine how this could b affected: scope analysis would cause the bindings to go out of scope either way, and if these variables were in call-frame slots or registers, they wouldn't necessarily be any more garbage unless these slots were explicitly set to nil or something similarly drastic (because the savings would be so limited compared to the cost of doing this all over the place). | Making a hard-and-fast rule about this would lead to ridiculous coding | style if taken to the limit. I'll trust readers of hard-and-fast rules to exercise their judgment and not take things to ridiculous limits. I think the question merits thought -- it's one of those small things that it's too easy to waste time on because we're _not_ thinking about it, and I for one think this question and questions like it would make it a lot easier for more experienced programmers to help new programmers get a feel for the language in actual use. this is the "experience" part that you get from reading lots of code and spending your working hours among other Lisp programmers. I think it's nice to see this newsgroup assume part of that role, too. #:Erik