From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wojciech Meyer Newsgroups: gmane.emacs.devel Subject: Re: Pushing the `gnus-range-*' functions down into the C layer Date: Sat, 11 Sep 2010 17:15:00 +0100 Message-ID: <87y6b8tfy3.fsf@gmail.com> References: <8739ti68sz.fsf@lifelogs.com> <87pqwm1dsl.fsf@uwakimon.sk.tsukuba.ac.jp> <87iq2d4sd5.fsf@lifelogs.com> <8762yd4r7j.fsf@lifelogs.com> <8762ydr5br.fsf@lola.goethe.zz> <87d3sk1edr.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1284221717 15215 80.91.229.12 (11 Sep 2010 16:15:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Sep 2010 16:15:17 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 11 18:15:16 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OuSjT-0003WS-Ek for ged-emacs-devel@m.gmane.org; Sat, 11 Sep 2010 18:15:15 +0200 Original-Received: from localhost ([127.0.0.1]:50504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuSjS-00076z-P7 for ged-emacs-devel@m.gmane.org; Sat, 11 Sep 2010 12:15:14 -0400 Original-Received: from [140.186.70.92] (port=59857 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuSjM-000758-CK for emacs-devel@gnu.org; Sat, 11 Sep 2010 12:15:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OuSjJ-0003e6-4n for emacs-devel@gnu.org; Sat, 11 Sep 2010 12:15:08 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:57284) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuSjI-0003dv-Tm for emacs-devel@gnu.org; Sat, 11 Sep 2010 12:15:05 -0400 Original-Received: by wyb36 with SMTP id 36so4954997wyb.0 for ; Sat, 11 Sep 2010 09:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=qxQipsdhctoR4CBhzAMHO2cz0XBHUQgvKUiq8ER3Z50=; b=clH9+rmzBc2sRdFHhJVQiWC/hH0mRlYo5bdDfZuo3xqC/4WgdOTnKD8mhEalSq18x0 4wC3giAipG6coIar4sJrBN9SCqiro05Umxcv6M+4tuXiylAZRxGXGEdCPM5ZVxNwiykI vhpjpyQRAGoTIaXcaEAC1uiSI2JfZSeBAusJM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; b=baUZvOscqM8ZjAwhKA2+K4Pm956XtkwO9GZ8s+V1uPYwST768qHz85teEf1MSi+Z5a Qcu4HK++z4qdcQlVdmrRmFk7dOtbmKCrYXTK4dPsxlGwLxs5KY7pJLT/7mrPsE+dk2Ic Iujp3M0xa8veCgV4lPR4Rw52MhNyVWXqfurBk= Original-Received: by 10.227.129.4 with SMTP id m4mr1223334wbs.123.1284221703990; Sat, 11 Sep 2010 09:15:03 -0700 (PDT) Original-Received: from spec-desktop.specuu.com (host86-147-138-117.range86-147.btcentralplus.com [86.147.138.117]) by mx.google.com with ESMTPS id w31sm3390030wbd.15.2010.09.11.09.15.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 11 Sep 2010 09:15:03 -0700 (PDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sat, 11 Sep 2010 17:51:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129993 Archived-At: Lars Magne Ingebrigtsen writes: > "Stephen J. Turnbull" writes: > >> No, for all types. First you have to check whether something is a >> bignum, then if not you do a bit-pattern comparison. Worst case this >> could double the cost of doing EQ(x,y) in C, and in Lisp `eq' will >> cost a perceptible amount more. > > Right. Is EQ in C just implemented as a memory check, and absolutely > nothing else? It doesn't touch the data at all in any way? > > *etag around a bit* > > #define EQ(x, y) (XHASH (x) == XHASH (y)) > > which is > > /* Return a perfect hash of the Lisp_Object representation. */ > #define XHASH(a) (a) > > So, yeah, stupid idea. Never mind. Yes, because it is physical equivalence, and pointers are unique. In this case I agree, it should not be called XHASH because that implies it is used for structural equivalence, which is misleading. Also, hashing object should behave like deep copying - follow pointers. Wojciech