From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master f18af6c: Audit use of lsh and fix glitches Date: Thu, 23 Aug 2018 11:56:18 -0400 Message-ID: References: <20180821204437.16880.99611@vcs0.savannah.gnu.org> <20180821204439.62390209A6@vcs0.savannah.gnu.org> <53d0c06e-2383-955a-0a17-650fd842b483@cornell.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1535039694 26113 195.159.176.226 (23 Aug 2018 15:54:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Aug 2018 15:54:54 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 23 17:54:50 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fsrwf-0006eX-Ok for ged-emacs-devel@m.gmane.org; Thu, 23 Aug 2018 17:54:49 +0200 Original-Received: from localhost ([::1]:37413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsryk-0000wB-2e for ged-emacs-devel@m.gmane.org; Thu, 23 Aug 2018 11:56:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsryA-0000vn-Tf for emacs-devel@gnu.org; Thu, 23 Aug 2018 11:56:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fsry7-0003HN-Pt for emacs-devel@gnu.org; Thu, 23 Aug 2018 11:56:22 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:32910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsry7-0003HF-LY for emacs-devel@gnu.org; Thu, 23 Aug 2018 11:56:19 -0400 Original-Received: from lechazo.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w7NFuIOb025480; Thu, 23 Aug 2018 11:56:18 -0400 Original-Received: by lechazo.home (Postfix, from userid 20848) id 3633060486; Thu, 23 Aug 2018 11:56:18 -0400 (EDT) In-Reply-To: (Pip Cet's message of "Thu, 23 Aug 2018 14:55:31 +0000") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6358=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6358> : inlines <6826> : streams <1796339> : uri <2694462> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:228851 Archived-At: > Well, it isn't `==' if we're building with > --enable-check-lisp-object-type, Currently, the resulting assembly code should be pretty close even in that case, tho. > extra condition for "overloaded" objects. Assuming some compiler > smarts, NILP wouldn't suffer, and EQ wouldn't suffer if one side is > known to have a normal type. I doubt the performance hit will be > measurable; if anything, the if-fixnum-do-this-if-bignum-do-that code > we have right now might be worse for caches than making the bignum > code a cold function. The whole purpose of hash-consing (for me) is to avoid turning EQ into something like: if (BIGNUMP (x)) return slow_eq (x, y); else return x == y; What we do in slow_eq is largely irrelevant: the problem is the cost of `if (BIGNUMP (x))`, both in terms of code size and processing time. Stefan