From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news-hub.siol.net!newsfeed.Austria.EU.net!newsfeed.kpnqwest.at!nslave.kpnqwest.net!nloc.kpnqwest.net!nmaster.kpnqwest.net!nreader1.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: data hygiene [Re: Why is Scheme not a Lisp?] References: <87u1rkl068.fsf@charter.net> <87wuwg1b05.fsf@photino.sid.rice.edu> <87ofhrc3ed.fsf@charter.net> <874rjj1ve1.fsf@photino.sid.rice.edu> <87it7yz2sf.fsf@photino.sid.rice.edu> <87d6y5heq2.fsf@becket.becket.net> <87elilwsnx.fsf@photino.sid.rice.edu> <87u1rfn07o.fsf@becket.becket.net> <87k7sbtzp5.fsf@photino.sid.rice.edu> <871yej1v0h.fsf@becket.becket.net> <3225566321428508@naggum.net> <3C97C8EA.38FFD47A@motorola.com> <3225571208798099@naggum.net> <3C9806B8.B239D290@interaccess.com> <3225694232096978@naggum.net> <3C99D8D6.CA34A3D6@interaccess.com> <3225739029050571@naggum.net> <41yedf67z.fsf@beta.franz.com> <4sn6tdlln.fsf@beta.franz.com> Mail-Copies-To: never From: Erik Naggum Message-ID: <3225784077592910@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 31 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 22 Mar 2002 11:07:44 GMT X-Complaints-To: newsmaster@KPNQwest.no X-Trace: nreader1.kpnqwest.net 1016795264 193.71.199.50 (Fri, 22 Mar 2002 12:07:44 MET) NNTP-Posting-Date: Fri, 22 Mar 2002 12:07:44 MET Xref: archiver1.google.com comp.lang.lisp:29846 * Duane Rettig | It's interesting, though, that the builting assoc function being | called is named *assq, which historically might imply :test #'eq | instead of the default :test #'eql. But (eql ) is identical to (eq ), so there is no point in using assoc with eql when you know that you search for something for which eql and eq are identical. I note that Allegro CL in all versions I have cared to look at, collapse eql to eq when the type of one of the operands is not of type number or character. | If you have supplied the list to it as a constant alist, it could have | implied that :test #'eq was good enough, since all of the keys are | symbols. I'm surprised, though, that it didn't just unroll the loop | inline. But perhaps it would have if you had compiled with higher | speed/safety ratio. Lispworks generally does not inline even car or cdr as I have seen it, either, while Allegro CL makes them a single instruction. (Good job!) | So it seems like your test isn't checking against the potential speed of | assoc vs getf, but only the current default speed of the implementation, | probably due to optimizations for the Gabriel Benchmarks. It is instructive to see the cost of benchmarks affect program design by almost "misrepresenting" the case for a particular design choice. /// -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief.