From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Problem with position and find (cl) Date: Fri, 20 Jun 2008 22:04:31 -0400 Message-ID: References: <6c2bb4F3dibi5U1@mid.individual.net> <6c2gf4F3eltftU1@mid.individual.net> <87hcbng8z6.fsf@sophokles.streitblatt.de> <87abhfg0mn.fsf@sophokles.streitblatt.de> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1214016100 3975 80.91.229.12 (21 Jun 2008 02:41:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Jun 2008 02:41:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 21 04:42:25 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K9t3X-0002PH-TH for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Jun 2008 04:42:24 +0200 Original-Received: from localhost ([127.0.0.1]:57023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9t2j-0001q5-3L for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jun 2008 22:41:33 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 20 Jun 2008 21:04:31 -0500 Original-Newsgroups: gnu.emacs.help Mail-Copies-To: nobody User-Agent: MT-NewsWatcher/3.5.3b2 (Intel Mac OS X) Original-Lines: 36 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 24.34.108.171 Original-X-Trace: sv3-z1Z5ia4xw7DQWoJfdmfwvozU0S/bZAlsSRKODUC9b++sUnuIxfmOKMKec94wm5Z1kiQnMZQXAluVjL6!8kyzc42lOxRrVg3ovxhy5Vcw69RZqKaqHL+RLvU8msRR5rghIuhX72q55Cq+2NYmeQXkP5Fiv9Fe!Waej6PVboULpf1nvUCXwDYds/r2R4XXtRo/evIQ= Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:159654 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55008 Archived-At: In article <87abhfg0mn.fsf@sophokles.streitblatt.de>, Florian Beck wrote: > Thierry Volpiatto writes: > > > > position default test is 'eq, try 'equal > > Indeed, many cl-tests default to 'eq. > > BTW, what is the reason for this (apart from being a language convention)? Just because things look similar doesn't mean they're the same. Imagine if you use a list like (firstname lastname) to represent people, and you have two John Smiths in the group. > > When I try > > (let ((start-time (current-time))) > (dotimes (i 1000000) > (position '(1) '((2) (5) (2) 2 x 4 fer fer f r e wqf (1) fr r) :test > 'eq)) > (format-time-string "%S" (time-since start-time))) > > with 'eq and 'equal I get the same result. So 'eq is not more efficent, > is it? For a single-element list the difference is almost negligible. Try again with long lists, like 50 or 100 elements long. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***