From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Floating-point constant folding in Emacs byte compiler Date: Mon, 2 Apr 2018 08:02:45 -0700 (PDT) Message-ID: <2cbe34db-d20b-4eba-8a25-acd99b648a17@default> References: <83vadmgfbz.fsf@gnu.org> <83h8p2g99p.fsf@gnu.org> <87370m3k4y.fsf@gmail.com> <7a49cbdf-f2c3-0803-2ee8-3d9f55e405a5@cs.ucla.edu> <7a4f10ec-c1b9-953d-7a95-b2f1ff762735@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1522681341 13716 195.159.176.226 (2 Apr 2018 15:02:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2018 15:02:21 +0000 (UTC) Cc: Eli Zaretskii , eggert@cs.ucla.edu, emacs-devel@gnu.org, Noam Postavsky , rpluim@gmail.com To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 02 17:02:16 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 1f30yN-0003QQ-G0 for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2018 17:02:15 +0200 Original-Received: from localhost ([::1]:41153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f310Q-0003jl-Vz for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2018 11:04:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f30z8-0003i6-Ic for emacs-devel@gnu.org; Mon, 02 Apr 2018 11:03:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f30z7-0005g9-KF for emacs-devel@gnu.org; Mon, 02 Apr 2018 11:03:02 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:35088) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f30z3-0005cQ-Ha; Mon, 02 Apr 2018 11:02:57 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w32Eh3lT140405; Mon, 2 Apr 2018 15:02:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=p8/Zyn3BGgFlCk8bkmQSexcXiBzASANW2cAEUX70wYY=; b=KAE9dfr6gMCwvvM67Tw2eVMkFLeC5FuqBF8jt8w2G72szpeSrKuh5qxUtPvgnxiZgD/Q 2t1Sfp9CHFa9smAOR2Q7uWLO7eqDCnCm0T3aW7QSzKJzk6bkF995ssvb5Fm1NfwzAO36 +ANPPe3YbNC3UpwfYwclLV0GVcwwgT0NGAFVsKcfiNU4aWaYT7UmUCMdXwMcH6pwMMeA fAQklVkmVniBq0cb2zoUsKeDiaALDf2eBzW79BlKH0AAHVz8YZVNZXnY9LvleDNpMUmz HzcFf1AmEBbA33ZW3qGRWySWdGUBsGDQzUkOfPUrOQza98puiWnNSZr6x9uzysEhtspc XA== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2h3phc83nm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Apr 2018 15:02:48 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w32F2mFg028722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 2 Apr 2018 15:02:48 GMT Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w32F2lOF023662; Mon, 2 Apr 2018 15:02:47 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8850 signatures=668697 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=640 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804020159 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 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:224248 Archived-At: > > Would it be possible for a user or Lisp code to be > > able to specify that it does not want the byte compiler > > to perform such floating-point optimization, in order > > to provide more platform-independence? >=20 > I think it's slightly different: I think it should be possible to > instruct the compiler, in special cases (when building byte code that > is to be run on several different machines/Emacs implementations), to > perform the optimizations, which result in code that is very slightly > more efficient and less platform-dependent (but might break certain > long-standing assumptions about independently constructed floats never > being eq). It's the unoptimized code that makes it easy to rely on > platform-dependent features, and that depends on implementation > details in ways that the optimized code does not. >=20 > > Many uses of Emacs Lisp and C code don't really need > > such optimization, I would think. Couldn't the byte > > compiler be made to respect a user (or Lisp-code) > > choice here? >=20 > If I understand Eli correctly, there's no way to enable the new option > by default, because old code might break in subtle ways; that also > makes it questionable whether it's worth it to include the new option > at all. My concern is to not have platform-independence suffer more, or at least be able to optionally prevent that as much as possible.