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: Floating-point constant folding in Emacs byte compiler Date: Mon, 02 Apr 2018 10:48:25 -0400 Message-ID: References: <2ce39e5c-cd1b-65d6-b125-719caad67932@cs.ucla.edu> <83vadmgfbz.fsf@gnu.org> <87d0zr2n1u.fsf@gmail.com> <83h8p2g99p.fsf@gnu.org> <87370m3k4y.fsf@gmail.com> <838taeg6z5.fsf@gnu.org> <7a49cbdf-f2c3-0803-2ee8-3d9f55e405a5@cs.ucla.edu> <7a4f10ec-c1b9-953d-7a95-b2f1ff762735@cs.ucla.edu> <83y3i568i0.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1522680465 13306 195.159.176.226 (2 Apr 2018 14:47:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2018 14:47:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 02 16:47:41 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 1f30kH-0003M2-23 for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2018 16:47:41 +0200 Original-Received: from localhost ([::1]:40251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f30mK-0005lE-Jp for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2018 10:49:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f30lB-0005l7-CY for emacs-devel@gnu.org; Mon, 02 Apr 2018 10:48:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f30l7-0007MU-8a for emacs-devel@gnu.org; Mon, 02 Apr 2018 10:48:37 -0400 Original-Received: from [195.159.176.226] (port=37146 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f30l7-0007Kg-14 for emacs-devel@gnu.org; Mon, 02 Apr 2018 10:48:33 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f30j0-0001uj-Pr for emacs-devel@gnu.org; Mon, 02 Apr 2018 16:46:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 15 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:6jA4lpJbwnYxH+/NavN1I3HgDAA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:224244 Archived-At: > Yes, because strings share the same EQ issue with floats. And because > we sometimes try to "optimize" that. For example, in make_pure_string. It's actually subtly different: with floats, EQ (and functions that use it) is the *only* way to distinguish two equal floats. With strings it's not the case because you can modify the object in place (e.g. by changing its text-properties). So for strings, the semantics is much less undefined: we're not free to merge two strings just because they're `equal`, whereas for floats we are. Stefan