From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Bug#38708: eq vs eql in byte-compiled code Date: Tue, 31 Dec 2019 09:38:18 -0800 Organization: UCLA Computer Science Department Message-ID: <8cd1b5b2-b94e-ce64-0d70-c1b8b012d685@cs.ucla.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="9866"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 Cc: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= , emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 31 18:39:02 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1imLTy-0002QA-87 for ged-emacs-devel@m.gmane.org; Tue, 31 Dec 2019 18:39:02 +0100 Original-Received: from localhost ([::1]:44996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imLTw-0006s9-Dz for ged-emacs-devel@m.gmane.org; Tue, 31 Dec 2019 12:39:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44551) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imLTT-0006SE-Qi for emacs-devel@gnu.org; Tue, 31 Dec 2019 12:38:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imLTS-00083w-8J for emacs-devel@gnu.org; Tue, 31 Dec 2019 12:38:31 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43946) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1imLTS-0007eL-1G for emacs-devel@gnu.org; Tue, 31 Dec 2019 12:38:30 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D48BD16022A; Tue, 31 Dec 2019 09:38:19 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id bQItdumGe98l; Tue, 31 Dec 2019 09:38:19 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2F20616027E; Tue, 31 Dec 2019 09:38:19 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3kPc5trfIcPC; Tue, 31 Dec 2019 09:38:19 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0354B16022A; Tue, 31 Dec 2019 09:38:18 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:243818 Archived-At: On 12/31/19 7:07 AM, Pip Cet wrote: > the reason I would prefer not > to see it installed on the Emacs 27 branch, is that the apparent > behavior of eq will change in ways that seem paradoxical at first. One possible compromise would be to duplicate only bignums in the emacs-27 branch, while reserving flonum deduplication for the master branch. This would help a bit with now-incorrect code that uses eq to compare bignum values, while not introducing flonum "paradoxes". > Another option might be to deduplicate constants before optimizing > forms such as (eq 1.0 1.0). That would be more work, but would also > avoid the problem. How about going a bit further, and globally deduplicating all flonums and bignums that result from low-level text-to-number conversion and module imports? That conversion is slow and/or rare already, and if we're lucky deduplication wouldn't make things noticeably slower and wouldn't be much work.