From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Problem with position and find (cl) Date: Sat, 21 Jun 2008 06:57:32 +0200 Message-ID: <87abhf2xmr.fsf@thievol.homelinux.org> 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 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214023944 18848 80.91.229.12 (21 Jun 2008 04:52:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Jun 2008 04:52:24 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Florian Beck Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 21 06:53:07 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 1K9v60-00088v-6O for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Jun 2008 06:53:04 +0200 Original-Received: from localhost ([127.0.0.1]:34342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9v5A-0002MV-Vx for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Jun 2008 00:52:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K9v4k-0002L0-Gp for help-gnu-emacs@gnu.org; Sat, 21 Jun 2008 00:51:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K9v4j-0002JN-DH for help-gnu-emacs@gnu.org; Sat, 21 Jun 2008 00:51:45 -0400 Original-Received: from [199.232.76.173] (port=39064 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9v4j-0002J7-8p for help-gnu-emacs@gnu.org; Sat, 21 Jun 2008 00:51:45 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.154]:17777) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K9v4j-0006z2-0G for help-gnu-emacs@gnu.org; Sat, 21 Jun 2008 00:51:45 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l26so814626fgb.30 for ; Fri, 20 Jun 2008 21:51:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=S7OwhmHHu/pWc4G2Molnp1CrBYUQTNmgXa9SiIOVhgI=; b=Ny3j2OboiiTaXLNXLB+szAeVgNJMjcjliwTk6xIr1SF+0eUJPhfwdMwDwOC8hXUHpR VvENOp6RXefbe55ltvSS+LkvWFY88DOzTv907gmKnfHc0gSoK4N/tgz/obbYg/mT+q53 KVg5HemRAogo0I/Gk3fvuYfDSIkRVbG0R17Uw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=bXjjzegb1U1qyw5s0suaRlVIpQpzhESfmlM33xAVBeEfkgNL8uk1waWp0aXTmDW46D HKcxXJSG2TzWggV00+cETkgsLL6pTIVlpCLJdJ6Ke3LXViIOnh7SlVw2/11Uw4ha3sop mW6NaAS3Gn8zuuxcNOU7ZgLfwWPsGR3cGx8qw= Original-Received: by 10.86.29.19 with SMTP id c19mr4983156fgc.28.1214023903941; Fri, 20 Jun 2008 21:51:43 -0700 (PDT) Original-Received: from thievol.homelinux.org ( [77.197.77.55]) by mx.google.com with ESMTPS id l19sm5230495fgb.7.2008.06.20.21.51.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 20 Jun 2008 21:51:43 -0700 (PDT) In-Reply-To: <87abhfg0mn.fsf@sophokles.streitblatt.de> (Florian Beck's message of "Sat, 21 Jun 2008 01:14:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:55014 Archived-At: Florian Beck writes: > 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)? > > 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? eq compare two objects and say if they are the same. equal compare two objects and say if the value of these object is the same. ,---- | ELISP> (setq A '(1 2)) | (1 2) | | ELISP> (setq B '(1 2)) | (1 2) | | ELISP> (eq A B) | nil | ELISP> (equal A B) | t `---- -- A + Thierry Pub key: http://pgp.mit.edu