From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jun 2020 22:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 42147@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.1593556050475 (code B ref -1); Tue, 30 Jun 2020 22:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jun 2020 22:27:30 +0000 Received: from localhost ([127.0.0.1]:51916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqOiw-00007b-Hg for submit@debbugs.gnu.org; Tue, 30 Jun 2020 18:27:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:36872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqOiu-00007S-EO for submit@debbugs.gnu.org; Tue, 30 Jun 2020 18:27:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqOit-0000ye-Va for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 18:27:28 -0400 Received: from sonic309-25.consmr.mail.ir2.yahoo.com ([77.238.179.83]:37702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqOin-0003Ol-8t for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 18:27:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593556037; bh=0nDH+nZl3uzPCUOMC6U/qhHVimDHrYfCbfDGuY/pROk=; h=Date:From:To:Subject:References:From:Subject; b=RUtUZzo+QhQL/hZWHV1Lc8carDznK1BqR9QTxbeAE3PmWGUCEVIWClQdgmocg5qW2JtO3XyqBe9wVQzKfiBlXWJldptRqxCsHChfrTtznwQZGPrytWMnwdfNVUL390CXrs77BUUs3EeX1QumLrddfGQS43V/LwVOhbEaCi5gIHMjajZyWlzoyVd1yxgvmwor4vvqXECo3bMlVMp9/6Se2WSOq8T5txhKyQbdz4wFXyQTNpgToPa7wf1COv0hLXF/WRNaz3+VPVUcxQ5FbN0uxDf8TokzBexNd/MHTZz1rXQ8JW45on9pOXDTR5eC0inO254uILQq3WdkqR3g/d2Kxw== X-YMail-OSG: PrbI6W0VM1mqM8xRZh993rYHQq27Sv6VaE1fNPaFg6FMW1GO4l3HpTl8c5vOBhe kuWeidJpbbLyrd5k2kmUVOySBtyh2dVKgbVds84rBUnjxyqbCOAJU9TIrp802xKQ69deYtTGpQ.W U3_Y4uUeFuhPFcA_IB7LcmzVFHlXpTebm0bQr_k8UALItfiYX4KM1XDM5LbjPIKDFIMmo4qdC.86 fdJ9XCkbgtr7IqyOnYnVQ3tI177C0uJpzgdZSCZ.HEmMe_DGkcVF8VHMYDFl758ixvBTBfZfddK. POJZXJbdE64nqIyB45b_atn.79Qn1rLvVJftaVJUVSTcOCI5uTKA0pR..dn5gd_1gC8ef2UmbB7J gp0q76p8MsT2xGtDCT6jl27UCuFx0fY5imQIhQ7RpCTvlpALMRXQgxa3wk8Zuo2tE_dWCAUOkNCf 8zSB.hx8N70jF9W9Q9ChYYM3W5esCVtGWD98DeObnOQYwlzKVh7KYy7gKrckuFop0lfR9lmUkOTa rGX2KElyXhQBHnByu43NlQJR9mqzblC1lypjEamYvyJH4MkqXULUGQ8eD0Inamv8Okv8bktc5s2W Fw4hWW3gItN7iEnK.ivjOF4NiNFcxgneK3_XodbyKF36hNzSOQsVgxSqMuFZqBY.6kEGtt9eCLkF iaSwez8oND6YRz1QzM1gttz7eihg81TuRgZcsoaoG3m2uTbzXhV8u9C2VTTqYs7z1kvTUGrVaWD6 Olroo8j3tBQqQ9yh4fou7i9HYJTh..jeysDAZ9D1HAHydCWBypqI6QqDz_7nyY8maudgBljHu6cp Oxmg.SxgBEdmsJXmonorf2AfwLpMSNWjQDG0znV1TSB3Kh_yW7oXs3OSx3u7MbYvsQ623budvGn_ xjD1hHQ6DqBgKeYLeCMPYS.l1KSsavMBNLyCrW6cTG0ozI7yEZjUSIrnSg90NPabriaD1iqbNJrT GQ74f3XhAkKX_6zolhgWuqj3NOgNoHRuz81yeq1qaSEibcZw3QOQddVwbUX8uLH0sExkZyqBzGwW A0YB9nxGasrM2ngUsIf1vAB2ttKO44iPmWmJke1e6L2bsL_YxjzYHbSI7uLdiYxJW7AekiVzetjJ Dgy03355NaGR0zv.qG1Ph2ZMBNANkqUG0rPcMX4JVsMfAKS8Be.A86u6Qke8AYGPj6v__mRGs3rn Cis2kEMu5Em5piOfx5y0YQ.SdMWh8bjy.OpxofaKmCzoZ9HbrcVdnQ7dLUNsGrPBZ9iOMkSVCFFb KxosxXTpCEKoIckboiWWTpcVkQorinB9Ma_1qo02UwV1adMoaZ2H8y.PxHvPmjs_rvhTfI7UI9WI whkLOzPBNwIKcblGDim.ZbTr6f6s- Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ir2.yahoo.com with HTTP; Tue, 30 Jun 2020 22:27:17 +0000 Date: Tue, 30 Jun 2020 22:27:12 +0000 (UTC) From: Andrea Corallo Message-ID: <1583748933.1069307.1593556032592@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: <1583748933.1069307.1593556032592.ref@mail.yahoo.com> X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 801 Received-SPF: pass client-ip=77.238.179.83; envelope-from=andrea_corallo@yahoo.it; helo=sonic309-25.consmr.mail.ir2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/30 18:27:17 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Hi all, I was looking in byte-opt.el to how are classified a number of functions. My understanding is that pure functions should be technically a subset of side-effect-and-error-free for which the environment has no influence on the value the function evaluates to.=C2=A0 For this reason they can be constant folded in the compile time if possible. Now in pure functions I see we do not have a lot of functions that (to my understanding) would classify for that.=C2=A0 I'm thinking to simple predicates acting on immutable objects as consp or fixnump to give an example. Shouldn't we move these into the pure class? ATM for instance this does not get optimized: (defun foo () =C2=A0 (fixnump 3)) In case this makes sense I'll be happy to work on it and prepare a patch. Thanks =C2=A0 Andrea From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jun 2020 23:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15935588564808 (code B ref 42147); Tue, 30 Jun 2020 23:15:02 +0000 Received: (at 42147) by debbugs.gnu.org; 30 Jun 2020 23:14:16 +0000 Received: from localhost ([127.0.0.1]:51956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqPSC-0001FU-8O for submit@debbugs.gnu.org; Tue, 30 Jun 2020 19:14:16 -0400 Received: from sonic308-19.consmr.mail.ir2.yahoo.com ([77.238.178.147]:34837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqPSA-0001FE-4V for 42147@debbugs.gnu.org; Tue, 30 Jun 2020 19:14:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593558847; bh=IkG/D3erbC7/E/61wZmbciU4I0vDfQQhVWzL2i9DpM4=; h=Date:From:To:In-Reply-To:References:Subject:From:Subject; b=sV84kdK1Y0rQ/pAS7/Kwo5CZSlSnF1IxzknU7Va/5GiLhY585lHHAdRyIXA8B7nzqey4m8OTmr5ZRHRzSY1QoooK6Nt1k1KZmGGLIQVeSHwaHbwMLJnYcuVQ9CQMDOMJyvonS+U2fQvTXM2J1H960QtYeMt+0dkuBPN285kf583CiMAz16av3VDDjzb8PH3KEpHJjz7TgGvtjrcyLYG99V01zUnGZtdb2czXR2ZVst2FKz3L0SV4sNdBzfPvtSDmYC+o48OPbV8WbPDVxJeZ/diJoLpSdMUw76ThXTmr6Fc+gihlJvwYKHep0E4lVulW11hDDWjtTXQ1sgdB9JuyUg== X-YMail-OSG: 5ulIfo8VM1lbBu5W_RgqD7OSikfT.6buSns2i6tv1c2ikQp2nCSUSFEigFnqbYk GviGXl3DMMNl.q_BxFseeF1X.uSnxG5JISCPfVw6fQPQKdK8WyXzoFIcDf7RpevVk_eUnsogqeBf zaoZu6crSUcGjzKZfckNZv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UZ7p3VY5CcR8UR7TfZwiWpOsZXR3foGOkkLZxiD_EiXcg BB1ixoSeWfgzO6hADbOn9K7zZXslXJMzKXO4PwvPxgJYFCuJuvlTqPGdy.rnS0ImI4GR_LtdU8mh Z3daBJDoCJGu874vP.w1u5ppeGxSj8IJbdRLJC4n11R4lsW_rO6WsRR9g.wx39KncWtFbVo0pzOD GjKBN Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ir2.yahoo.com with HTTP; Tue, 30 Jun 2020 23:14:07 +0000 Date: Tue, 30 Jun 2020 23:14:02 +0000 (UTC) From: Andrea Corallo Message-ID: <795864686.1072238.1593558842482@mail.yahoo.com> In-Reply-To: <1583748933.1069307.1593556032592@mail.yahoo.com> References: <1583748933.1069307.1593556032592.ref@mail.yahoo.com> <1583748933.1069307.1593556032592@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 178 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ok I realized that fixnump is a very bad example because the result is strictly platform dependent. Please replace it with numberp or some other simple predicate. =C2=A0 Andrea From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? References: <1583748933.1069307.1593556032592@mail.yahoo.com> In-Reply-To: <1583748933.1069307.1593556032592@mail.yahoo.com> Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2020 12:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15936074901609 (code B ref 42147); Wed, 01 Jul 2020 12:45:01 +0000 Received: (at 42147) by debbugs.gnu.org; 1 Jul 2020 12:44:50 +0000 Received: from localhost ([127.0.0.1]:52506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqc6b-0000Pt-Qc for submit@debbugs.gnu.org; Wed, 01 Jul 2020 08:44:50 -0400 Received: from mail209c50.megamailservers.eu ([91.136.10.219]:54322 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqc6X-0000Ph-Es for 42147@debbugs.gnu.org; Wed, 01 Jul 2020 08:44:48 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593607475; bh=g3eC8TrzfloImmKX4R1FU8IwswtSHgJz/wSfgfMHDeg=; h=From:Subject:Date:Cc:To:From; b=YeC8Ihn0VwsawhAfZfurL54+jTCVz7boOBEVqyhUQVz2yLZbwj38CHbTwBrf2toGp OavsX2zyX3H0+WGdenr3v9+248xNFEldsoNbc/mJCU83a35iFrznnEH3hW3MRpmEvX j1AyJfHeiNDQTPEsReJtmIFL1Os6eghpuNrTGWzo= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 061CiTFP014200; Wed, 1 Jul 2020 12:44:32 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Message-Id: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> Date: Wed, 1 Jul 2020 14:44:28 +0200 X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F26.5EFC8533.0013, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KsozJleN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=o4PFunNoQrfdS7EHdFgA:9 a=RPD5saMwKC-daLFD:21 a=0PV5PGcP_wwm1AIM:21 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Actually, pure functions are side-effect-free but not necessarily = error-free. But in essence, you are right. The following functions look like they could be marked pure. Given that = they currently aren't, there may be a good reason for their omission -- = do correct me! integerp natnump floatp characterp numberp arrayp vectorp bool-vector-p char-or-string-p integer-or-marker-p keywordp number-or-marker-p sequencep length safe-length ... and some more (symbolp, stringp etc) that are already explicitly = optimised. Regarding fixnump, we could add an optimiser since this predicate can be = constant-folded for certain arguments, but it's unclear whether it's = worth the trouble since this predicate (and bignump) are less commonly = used today. Most uses of fixnump (in Emacs) are in Calc, and those are = probably relics that should be replaced. More useful would be the ability to constant-fold ash, expt, %, mod and = abs for a subset of each respective domain. I can write a patch. We could also decide that it's not a problem if an operation returns = either a fixnum or bignum depending on the platform, on the grounds that (1) the distinction is not directly carried over through numeric = constants (bignums and fixnums look the same in .elc files) (2) any attempt to discriminate between fixnums and bignums is = non-portable anyway (and we can punt the discrimination to runtime) and thus constant-fold all integer operations (+, -, * etc), not just = those resulting in a portable fixnum. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2020 12:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15936076391881 (code B ref 42147); Wed, 01 Jul 2020 12:48:01 +0000 Received: (at 42147) by debbugs.gnu.org; 1 Jul 2020 12:47:19 +0000 Received: from localhost ([127.0.0.1]:52511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqc91-0000UG-9u for submit@debbugs.gnu.org; Wed, 01 Jul 2020 08:47:19 -0400 Received: from sonic304-22.consmr.mail.ir2.yahoo.com ([77.238.179.147]:39971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqc8x-0000U2-Tq for 42147@debbugs.gnu.org; Wed, 01 Jul 2020 08:47:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593607629; bh=FaLQnrEwbjW+lHAFpNTUzSNVDm86qkb46m2dTMBO5Ww=; h=Date:From:To:In-Reply-To:References:Subject:From:Subject; b=UI2EZa+Pe5KclMa6RHd4k46SYKmIUOuCgKJE4SG6wgFchD+KdeNTCUGUup5ixmMa/qDv9PfKjnDRROD81+2230TM8SsKOaogbt2CCD8Elp6f9Kv5vAd4170c6wRh5S+9ptODz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plI8x48OQgXkEfsiQUKwjNHO4G_72F1n_7N4e96ml4.kqX10GUsPnOmS IDyHplL2OYIAbfLpR0y6X.2xli8m6IeHFvKdx5izNtjvxE1rf4SjITlmApY40.gL89GWkdeH.wWM xqSHvIUawo2YhnsgKQ_1UGGz70tCrfWR9V6RT6hOj5aSI.xTYP8p4L3pNY0SH3.F1b4.HqLT9z5Q CEP5HB00BZSG4kjjENMVn6dOtvN0WhWRnA_d2gnZuDyp8QU1Iey5MAxGtFEEi0mcP.ZmcvsqvWxv xgkmr.Osw.M8B9TInRLrJ4LkC6Y2kvsC9llhIO9WJlVM_sYVgRZGORQcfXfYgSDLcYmqTPeqSJnm HJLskOj8jPTZ3eUFYs22tE8twrLqwfkV8Pk0Sat58UCT2Q6z9Rz6Glgsv20aOTXAagxIUp87wIG6 1V._wzCe_vIzrEGcoCIazY50qfTUTWhtbGdVadBqW8gkDEqu9GA6uHZ4AfYMcNLLMNNWZfaBhhY. w3.Cy45S17SdCQYM2 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Wed, 1 Jul 2020 12:47:09 +0000 Date: Wed, 1 Jul 2020 12:46:57 +0000 (UTC) From: Andrea Corallo Message-ID: <678543695.1594067.1593607617409@mail.yahoo.com> In-Reply-To: <795864686.1072238.1593558842482@mail.yahoo.com> References: <1583748933.1069307.1593556032592.ref@mail.yahoo.com> <1583748933.1069307.1593556032592@mail.yahoo.com> <795864686.1072238.1593558842482@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1594066_652360258.1593607617409" X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 2435 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ------=_Part_1594066_652360258.1593607617409 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The attached is setting as pure: arrayp, bool-vector-p, consp, char-or-string-p, floatp, hash-table-p, integerp, listp, natnump, nlistp, not, null, string-lessp, stringp, symbolp, vectorp. Feedback welcome. Thanks =C2=A0 Andrea ------=_Part_1594066_652360258.1593607617409 Content-Type: text/x-patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="=?UTF-8?b?MDAwMS1BZGQtc29tZS1mdW5jdGlvbi10by1wdXJlLWZucy5wYXRjaA==?=" Content-ID: <097bc941-fb87-e0d8-6da7-0ebacff8ca15@yahoo.com> RnJvbSAxMGMxMTVkYTcyNTU4MWIzOTY5ZGFiN2U0NTNiZjRiNGZhYzE4NWQzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmRyZWEgQ29yYWxsbyA8YWtybEBzZGYub3JnPgpEYXRlOiBX ZWQsIDEgSnVsIDIwMjAgMTA6MDc6NTcgKzAyMDAKU3ViamVjdDogW1BBVENIXSAqIEFkZCBzb21l IGZ1bmN0aW9uIHRvIHB1cmUtZm5zCgoJKiBsaXNwL2VtYWNzLWxpc3AvYnl0ZS1vcHQuZWwgKHB1 cmUtZm5zKTogQWRkOiBhcnJheXAsCglib29sLXZlY3Rvci1wLCBjb25zcCwgY2hhci1vci1zdHJp bmctcCwgZmxvYXRwLCBoYXNoLXRhYmxlLXAsCglpbnRlZ2VycCwgbGlzdHAsIG5hdG51bXAsIG5s aXN0cCwgbm90LCBudWxsLCBzdHJpbmctbGVzc3AsCglzdHJpbmdwLCBzeW1ib2xwLCB2ZWN0b3Jw LgotLS0KIGxpc3AvZW1hY3MtbGlzcC9ieXRlLW9wdC5lbCB8IDggKysrKystLS0KIDEgZmlsZSBj aGFuZ2VkLCA1IGluc2VydGlvbnMoKyksIDMgZGVsZXR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617409-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2020 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159361973122033 (code B ref 42147); Wed, 01 Jul 2020 16:09:02 +0000 Received: (at 42147) by debbugs.gnu.org; 1 Jul 2020 16:08:51 +0000 Received: from localhost ([127.0.0.1]:53637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqfI3-0005jJ-EW for submit@debbugs.gnu.org; Wed, 01 Jul 2020 12:08:51 -0400 Received: from mail1478c50.megamailservers.eu ([91.136.14.78]:49256 helo=mail118c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqfHz-0005iw-UY for 42147@debbugs.gnu.org; Wed, 01 Jul 2020 12:08:50 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593619713; bh=Ibe+anABKaf3S2VUi4oTGTXvcrQrZxi3VoVlJ+UCrD0=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=YTlaCd8mPqBCKH68AXnmqUYWP5jm6uwmyVSL0nzOzaIP2UoBsvhWgdgbv4h8/89DR 0H9wC8aUGNYg6QrkTVdhdb0lS+mEkeE/lcfAolOQYnY2jRy9zeBNihA6oILKuxpVNG FaiN636ouO5zG4ZYs9I877IdwV2FqpkRFBvIkuXE= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 061G8TMP014902; Wed, 1 Jul 2020 16:08:31 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_95A8B98D-10E4-4DEF-8850-D010A1F1BB5D" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Date: Wed, 1 Jul 2020 18:08:28 +0200 In-Reply-To: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F1F.5EFCB501.0094, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KaGsTjQD c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=6tmxTm_KZLYaJ9ZbfEYA:9 a=CjuIK1q_8ugA:10 a=teqb14kzXqgVTUaVCX4A:9 a=B2y7HmGcmWMA:10 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_95A8B98D-10E4-4DEF-8850-D010A1F1BB5D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Andrea, I see nothing directly wrong with your patch, but perhaps our = messages went past one another since our lists of proposed pure = functions differ. > More useful would be the ability to constant-fold ash, expt, %, mod = and abs for a subset of each respective domain. I can write a patch. Here is that patch. --Apple-Mail=_95A8B98D-10E4-4DEF-8850-D010A1F1BB5D Content-Disposition: attachment; filename=0001-Constant-fold-mod-ash-expt-and-abs-with-constant-int.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Constant-fold-mod-ash-expt-and-abs-with-constant-int.patch" Content-Transfer-Encoding: quoted-printable =46rom=20aa9ce87268365f766a0d70e6a86bf44067e86b78=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Wed,=201=20Jul=202020=2017:44:54=20+0200=0A= Subject:=20[PATCH]=20Constant-fold=20%,=20mod,=20ash,=20expt=20and=20abs=20= with=20constant=20integer=0A=20args=0A=0ATo=20ensure=20portability,=20= the=20optimisation=20is=20confined=20to=20calls=20where=20the=0Aresult=20= is=20a=20portable=20fixnum.=20(Bug#42147)=0A=0A*=20= lisp/emacs-lisp/byte-opt.el=20(byte-opt--integer-arith)=0A= (byte-optimize-binary-integer-arith,=20= byte-optimize-unary-integer-arith)=0A(byte-optimize-mod):=20New=20= functions.=0A(%,=20mod,=20ash,=20expt,=20abs):=20Set=20byte-optimizer=20= property.=0A*=20test/lisp/emacs-lisp/bytecomp-tests.el=0A= (byte-opt-testsuite-arith-data):=20Add=20test=20cases.=0A---=0A=20= lisp/emacs-lisp/byte-opt.el=20=20=20=20=20=20=20=20=20=20=20=20|=2035=20= ++++++++++++++++++++++++++=0A=20test/lisp/emacs-lisp/bytecomp-tests.el=20= |=2012=20+++++++++=0A=202=20files=20changed,=2047=20insertions(+)=0A=0A= diff=20--git=20a/lisp/emacs-lisp/byte-opt.el=20= b/lisp/emacs-lisp/byte-opt.el=0Aindex=2012bde8faf3..72c68d64b2=20100644=0A= ---=20a/lisp/emacs-lisp/byte-opt.el=0A+++=20= b/lisp/emacs-lisp/byte-opt.el=0A@@=20-801,6=20+801,34=20@@=20= byte-optimize-divide=0A=20=20=20=20=20=20=20=20=20=20=20form=0A=20=20=20=20= =20=20=20=20=20(cons=20'/=20args)))))=0A=20=0A+(defun=20= byte-opt--integer-arith=20(form)=0A+=20=20"Constant-fold=20FORM=20when=20= args=20are=20integers=20and=20the=20result=20a=20portable=20fixnum."=0A+=20= =20(let=20((args=20(cdr=20form)))=0A+=20=20=20=20(if=20(memq=20nil=20= (mapcar=20#'integerp=20args))=0A+=20=20=20=20=20=20=20=20form=0A+=20=20=20= =20=20=20(let=20((res=20(apply=20(car=20form)=20args)))=0A+=20=20=20=20=20= =20=20=20(if=20(byte-opt--portable-numberp=20res)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20res=0A+=20=20=20=20=20=20=20=20=20=20form)))))=0A+=0A= +(defun=20byte-optimize-binary-integer-arith=20(form)=0A+=20=20= "Constant-fold=20the=20binary=20integer=20arithmetic=20call=20FORM."=0A+=20= =20(if=20(=3D=20(length=20form)=203)=0A+=20=20=20=20=20=20= (byte-opt--integer-arith=20form)=0A+=20=20=20=20form))=0A+=0A+(defun=20= byte-optimize-unary-integer-arith=20(form)=0A+=20=20"Constant-fold=20the=20= unary=20integer=20arithmetic=20call=20FORM."=0A+=20=20(if=20(=3D=20= (length=20form)=202)=0A+=20=20=20=20=20=20(byte-opt--integer-arith=20= form)=0A+=20=20=20=20form))=0A+=0A+(defun=20byte-optimize-mod=20(form)=0A= +=20=20"Constant-fold=20the=20mod-like=20function=20call=20FORM."=0A+=20=20= (if=20(eql=20(nth=202=20form)=200)=0A+=20=20=20=20=20=20form=0A+=20=20=20= =20(byte-optimize-binary-integer-arith=20form)))=0A+=0A=20(defun=20= byte-optimize-binary-predicate=20(form)=0A=20=20=20(cond=0A=20=20=20=20= ((or=20(not=20(macroexp-const-p=20(nth=201=20form)))=0A@@=20-918,6=20= +946,13=20@@=20byte-optimize-concat=0A=20(put=20'max=20'byte-optimizer=20= 'byte-optimize-associative-math)=0A=20(put=20'min=20'byte-optimizer=20= 'byte-optimize-associative-math)=0A=20=0A+(put=20'%=20'byte-optimizer=20= 'byte-optimize-mod)=0A+(put=20'mod=20'byte-optimizer=20= 'byte-optimize-mod)=0A+=0A+(put=20'ash=20'byte-optimizer=20= 'byte-optimize-binary-integer-arith)=0A+(put=20'expt=20'byte-optimizer=20= 'byte-optimize-binary-integer-arith)=0A+(put=20'abs=20'byte-optimizer=20= 'byte-optimize-unary-integer-arith)=0A+=0A=20(put=20'=3D=20=20=20= 'byte-optimizer=20'byte-optimize-binary-predicate)=0A=20(put=20'eq=20=20= 'byte-optimizer=20'byte-optimize-binary-predicate)=0A=20(put=20'eql=20=20= =20'byte-optimizer=20'byte-optimize-equal)=0Adiff=20--git=20= a/test/lisp/emacs-lisp/bytecomp-tests.el=20= b/test/lisp/emacs-lisp/bytecomp-tests.el=0Aindex=20= bfe2d06a61..a96a7c8368=20100644=0A---=20= a/test/lisp/emacs-lisp/bytecomp-tests.el=0A+++=20= b/test/lisp/emacs-lisp/bytecomp-tests.el=0A@@=20-69,6=20+69,18=20@@=20= byte-opt-testsuite-arith-data=0A=20=20=20=20=20(let=20((a=203)=20(b=20= 2))=09=09=09=09=20=20=20(/=20a=20b=201))=0A=20=20=20=20=20(let=20((a=20= 3)=20(b=202))=09=09=09=09=20=20=20(/=20(+=20a=20b)=201))=0A=20=0A+=20=20=20= =20;;=20More=20arithmetic=20constant-folding=20(bug#42147).=0A+=20=20=20=20= (ash=203=2010)=0A+=20=20=20=20(ash=203=2025)=0A+=20=20=20=20(abs=20-20)=0A= +=20=20=20=20(abs=20-2305843009213693952)=0A+=20=20=20=20(expt=2010=203)=0A= +=20=20=20=20(expt=2010=2020)=0A+=20=20=20=20(%=2020=203)=0A+=20=20=20=20= (%=20-20=203)=0A+=20=20=20=20(mod=2020=203)=0A+=20=20=20=20(mod=20-20=20= 3)=0A+=0A=20=20=20=20=20;;=20coverage=20test=0A=20=20=20=20=20(let=20((a=20= 3)=20(b=202)=20(c=201.0))=20(+))=0A=20=20=20=20=20(let=20((a=203)=20(b=20= 2)=20(c=201.0))=20(+=202))=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_95A8B98D-10E4-4DEF-8850-D010A1F1BB5D-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jul 2020 21:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159363911718670 (code B ref 42147); Wed, 01 Jul 2020 21:32:02 +0000 Received: (at 42147) by debbugs.gnu.org; 1 Jul 2020 21:31:57 +0000 Received: from localhost ([127.0.0.1]:53819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqkKj-0004r4-1W for submit@debbugs.gnu.org; Wed, 01 Jul 2020 17:31:57 -0400 Received: from sonic303-21.consmr.mail.ir2.yahoo.com ([77.238.178.202]:35427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqkKd-0004qm-Dm for 42147@debbugs.gnu.org; Wed, 01 Jul 2020 17:31:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593639104; bh=3HZqkpzvvjfVUFp5gwibCE4qTo4atqaG9nH9wFNunGs=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=UUfA6y5SyExDz/wCRyMZt9y0B9qwPtPUwsOTzLFXYSx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3bIlHpannqXegDI5QoJ.dHdYyOXBtVta9Tq2StcDCYhudyFVsjUuUFVPF7 _svbywrUmG5Fm8iK6gyd572Iu46iYe4h6XTmNQduxF6c6N1K52Wnvn8Ziv4hD9ceAtqrfmq2rKFk ti.poWsAs1tgQIBwFXqI3uvZvDVg3sA1zMpt8kdIlLDJNtExqkqZkThiy_GpOZ4OCJg5QlgCgEla aEeh6T1Qp8_jN3ELNx0kUAZqNa7WojwKuZ4SPyKkrOAIgfMjhDcYH2OYA4oUfSkUeKsN3juW2sp0 lk0tKx8P7GlWpWC3gwjhpasIHyeJypHImTAEuZtIxA0XZhmufUyNW612YgJM7s4wEtt7q6jhT72n hmvm_1DxV139VeoN.MBIyNo7bd.lr3pbMkDOOFtZ1Y3Lw1sTjxwrSkQsEa7AtsL8230yEpluAlZA RXHsCXUmLngWaRyjbbYoIp67pu9x8AMqOqYgQ46LfOBnd6W30RzgXp7fNr9_IAnLt7pLw1GHKZ5Z XDOUrbacCPxE74KBdl8n0PWQmS2McGLzPpigl7Q9DeNNkT6gE0I9QTvTJzo1wSz5g3OoUkCqJdiq hOpIP8LYPWH7ob32XCYeVbrNydeaxdQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ir2.yahoo.com with HTTP; Wed, 1 Jul 2020 21:31:44 +0000 Date: Wed, 1 Jul 2020 21:31:31 +0000 (UTC) From: Andrea Corallo Message-ID: <1621669100.2102667.1593639091621@mail.yahoo.com> In-Reply-To: <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 1187 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > More useful would be the ability to constant-fold ash, expt, %, mod and a= bs for a subset of each respective domain. I can write a patch. Hi Mattias, I'm not sure what would be more useful, I guess both are a good thing to have.=C2=A0 Another reason why I'm interested is that I reuse these definitions in the native compiler. > Andrea, I see nothing directly wrong with your patch, but perhaps our mes= sages went past one another since our lists of proposed pure functions diff= er. yes that exactly what happen, thanks for looking at it. I diffed our two lists and this is the results, functions included in mine but not in your: consp, hash-table-p, listp, nlistp, not, null, string-lessp, stringp, symbolp. functions included in your but not in mine: characterp, integer-or-marker-p, keywordp, length, number-or-marker-p, numberp, safe-length, sequencep. I guess for the most part I can just include the one I've missed.=C2=A0 I'm not only sure about the one operating on lists like `length' given the list may be modified in the runtime (?). I'll update the patch once this point is clarified. Thanks =C2=A0 Andrea From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15936856342716 (code B ref 42147); Thu, 02 Jul 2020 10:28:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 10:27:14 +0000 Received: from localhost ([127.0.0.1]:54427 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqwQz-0000hi-Ek for submit@debbugs.gnu.org; Thu, 02 Jul 2020 06:27:14 -0400 Received: from mail233c50.megamailservers.eu ([91.136.10.243]:50142 helo=mail37c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqwQv-0000hV-8O for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 06:27:11 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593685616; bh=vp6P+uJ6Q/54Jsq6L3hDjFY1ooflN2+0znTdz9qSjbw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=LShFtcq5lIh05UHzqEZsz3HlFPeF/zb+lIAn8W6eM8kicsv3l7KXVMK/eQ+smMGMJ jeFQXDGb6l/FlCVyONMtW1kwOwoN9oeIX0DXwCbypf0cM+WG9JcF70BpmVIhr8gXbl 5kEL2C0wDe0rV6neu0l3PmBsWQf/RuLEikpaIttU= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail37c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 062AQpRG007802; Thu, 2 Jul 2020 10:26:53 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <1621669100.2102667.1593639091621@mail.yahoo.com> Date: Thu, 2 Jul 2020 12:26:51 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F22.5EFDB5C5.0094, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=bJNo382Z c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=vQ39kIYf1yTL1eD7LZIA:9 a=fuH0C7_SlnkRor91:21 a=XcD88_b8t1jAXqHb:21 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 1 juli 2020 kl. 23.31 skrev Andrea Corallo : > Another reason why I'm interested is that I reuse these > definitions in the native compiler. In that case there are probably more functions you may want to consider for purity -- what about: Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 1 juli 2020 kl. 23.31 skrev Andrea Corallo : > Another reason why I'm interested is that I reuse these > definitions in the native compiler. In that case there are probably more functions you may want to consider = for purity -- what about: < > <=3D >=3D =3D /=3D string< string=3D string-equal eq eql equal proper-list-p identity memq memql member assq assql assoc > I guess for the most part I can just include the one I've missed. By all means, but do not take my word for the correctness of my list -- = think it through yourself. We mustn't err here. > I'm not only sure about the one operating on lists like `length' given = the > list may be modified in the runtime (?). Not sure why this would be an obstacle, but I could have overlooked = something important! Could you explain your thinking in greater detail, = and if possible provide an example of code that you think might be = miscompiled if 'length' or 'safe-length' were marked pure? I still wonder if there is any reason to limit arithmetic constant = folding to the portable fixnum range. Given that we don't evaluate = fixnump or bignump at compile-time, what observable effects would = constant-folding, say, (ash 1 32) have? Advice from deeper thinkers = solicited! From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 11:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15936876145715 (code B ref 42147); Thu, 02 Jul 2020 11:01:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 11:00:14 +0000 Received: from localhost ([127.0.0.1]:54432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqwww-0001U7-0x for submit@debbugs.gnu.org; Thu, 02 Jul 2020 07:00:14 -0400 Received: from sonic313-20.consmr.mail.ir2.yahoo.com ([77.238.179.187]:40853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqwws-0001Ss-Ay for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 07:00:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593687599; bh=dPrEkC8YVLoaAavaaKmN+7ZVO9MORuvdJ9QLmIidpHI=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=OfOyItXJ8yQof+PrlgpP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VJpNs5iEKcu YtV__uhBBqq8_FSVURFM0n5chVBz0dl81Fcld9Lg9Q.uvMz0JMAUzJbfcZRzxO.isH9EVIwgSrgI hoyonUJMpJx2AG6JepG_eGXsX0qJr0WgklOlEXI0nqYGrS75TgCnbIzM9KRbEZyyyiB3FqPkLMhQ AL.eBB1uXbueR5zxM7Q7rH72y1o_IN8Hxvw.dfewGony36l6toDtoJz1pM4v8.ScW.Hwxa36R1ht W7_ZGdiLCanWoBuda2XjqaA9vxhRiO_Exd8xCxMw0jlC277uORao5KaZC7c13Of7QTT_dECbNlFt kkUkkv0w_v3y17aALMOmQFUe5S_6c6o8Uc0jWODo.QssxEXTCponAAJsxF1DLvbQoq.tfqcHAyFs Nmd.MXA.JBE.GTAQcye_04wlVti4PKp7QWLYta0KHD4Sx5CW9J3ONPN5BCTNrUek2gQaVi49Vr._ yq3rDJMQje2MUtP9xoKrkxdd9WLeDBhEDi2orL5uNm6bAMMWzJ8nscYi0pPXjkFYmflHHGbt2eFe 6h9XHwcEDvyL46hj7XZ2._iPse9KuTbqkD7jCvoc0UMRUQaW0wL96YA0Oy8eheurGfsZK73iP8Gn dJNg9ALrfQWr60J.LtjxCaJ13xxjtyg-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ir2.yahoo.com with HTTP; Thu, 2 Jul 2020 10:59:59 +0000 Date: Thu, 2 Jul 2020 10:59:54 +0000 (UTC) From: Andrea Corallo Message-ID: <775819003.2516724.1593687594435@mail.yahoo.com> In-Reply-To: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 1960 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 1 juli 2020 kl. 23.31 skrev Andrea Corallo : > >> Another reason why I'm interested is that I reuse these >> definitions in the native compiler. > > In that case there are probably more functions you may want to consider f= or purity -- what about: > > < > <=3D >=3D =3D /=3D > string< string=3D string-equal > eq eql equal > proper-list-p > identity > memq memql member > assq assql assoc Good point >> I guess for the most part I can just include the one I've missed. > > By all means, but do not take my word for the correctness of my list -- t= hink it through yourself. We mustn't err here. > >> I'm not only sure about the one operating on lists like `length' given t= he >> list may be modified in the runtime (?). > > Not sure why this would be an obstacle, but I could have overlooked > something important! Could you explain your thinking in greater > detail, and if possible provide an example of code that you think > might be miscompiled if 'length' or 'safe-length' were marked pure? No, thinking about I believe you are correct. I mixed in mind the fact that now the native compiler must handle correctly in the CFG also pure functions taking mutable objects (given we are adding them), but that is unrelated.=C2=A0 This is no problem for the bytecompiler given the constant folding is done only locally. So yes these are pure functions and so they should be marked. > I still wonder if there is any reason to limit arithmetic constant > folding to the portable fixnum range. Given that we don't evaluate > fixnump or bignump at compile-time, what observable effects would > constant-folding, say, (ash 1 32) have? Advice from deeper thinkers > solicited! I always thought the general idea is to respect the allocation side effect we have creating a bignum.=C2=A0 Not sure if the class of example yo= u have in mind here fits this case. Thanks =C2=A0 Andrea From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 12:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159369404624025 (code B ref 42147); Thu, 02 Jul 2020 12:48:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 12:47:26 +0000 Received: from localhost ([127.0.0.1]:54560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqycR-0006FC-QD for submit@debbugs.gnu.org; Thu, 02 Jul 2020 08:47:26 -0400 Received: from mail1452c50.megamailservers.eu ([91.136.14.52]:55408 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqycO-0006Ef-98 for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 08:47:10 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593694011; bh=wvF3+IcX2s1N6cyAt07+Mh/L7DhCyXXRyfpnQrOQJ/c=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=YMIUKBPk5cJS5CXfnqWzTAGvhJhypNk6bmPrZOQhoZiLe8A4izpzAN/mCBuiQnbMc xvH0vsL0Et8bfhc+znLOENHk6iNfnwc9+o/OxHYwYyf/uEY3J6gAWU224BSwdg7aPS mSNq1WZebNCI0rkXDEF9/kCJLE6NDb2mi9hfFo54= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 062CklAk001367; Thu, 2 Jul 2020 12:46:49 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <775819003.2516724.1593687594435@mail.yahoo.com> Date: Thu, 2 Jul 2020 14:46:47 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F29.5EFDCF60.003A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=A5MSwJeG c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=P_0GrDVPdYajMqkPTb8A:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 2 juli 2020 kl. 12.59 skrev Andrea Corallo : >> I still wonder if there is any reason to limit arithmetic constant >> folding to the portable fixnum range. Given that we don't evaluate >> fixnump or bignump at compile-time, what observable effec [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 2 juli 2020 kl. 12.59 skrev Andrea Corallo : >> I still wonder if there is any reason to limit arithmetic constant >> folding to the portable fixnum range. Given that we don't evaluate >> fixnump or bignump at compile-time, what observable effects would >> constant-folding, say, (ash 1 32) have? Advice from deeper thinkers >> solicited! >=20 > I always thought the general idea is to respect the allocation side > effect we have creating a bignum. Not sure if the class of example = you > have in mind here fits this case. Number allocation isn't a semantically visible effect and we probably = don't want to change that. As far as I can tell, only fixnump and = bignump can discriminate fixnums from bignums. There may be functions = that only accept fixnums as arguments and thus fail with a different = error, but I don't think we constant-fold any of them, and they would be = easy to fix if we did. It may be preferable to defer generation of very big numbers to = run-time, to avoid evaluation of (ash 1 1000) at compile-time, but such = a limit should, if implemented, be independent of the fixnum limit (and = likely higher). From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 13:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159369821331104 (code B ref 42147); Thu, 02 Jul 2020 13:57:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 13:56:53 +0000 Received: from localhost ([127.0.0.1]:55478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqzht-00085b-3k for submit@debbugs.gnu.org; Thu, 02 Jul 2020 09:56:53 -0400 Received: from sonic311-30.consmr.mail.ir2.yahoo.com ([77.238.176.162]:38514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqzhq-00085M-AO for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 09:56:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593698202; bh=fUvvMKvzwKzvzDDaa81e3GoKFcUHzUkZWHr+FezFWU8=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=J/atID05EHmD7/kJHaE/NEnXrQMb9AUoHHQFPNnqGHmPsFVGmVFyXQiXUN2U532nDG7L/aqxV15thvybACkobDWAO51K7cPw3YFxzv1RYD42HicM1P+qb4wZVxkyrAGXYC+d54r9DJ+1CQ9Y69iUvN0VJ5sFqSnBcsxlJ1H60Yut+U2JgyXs0uWBMNJOAEW3NcJBo3aWJB+iFkAK2SU4The6nnCzDoKS6HOxpgT2T8k+m6NPXLl1XalJ9pBTMCAp1jUbrYuOnxC0OdTcfgOid9JtK3g+tkXe9foZeTkc8A9U3x9MI34Jm+MeH4gWzJMeRs15ixK3b9Psj5tcyj2Tqw== X-YMail-OSG: IYxtRHMVM1kKYU0oP6ZcCGggxFFoCXKM2_Hc3bYUxCNGU3RWyFuWXZ9nZsrHyWQ IQJuD8iQ.dT4s5Q01XfjEwX5aaRABCgEzfJKhCyKCKelVcpUFYcVMXuQaumJnXJ3dAEYE5aQOPAh 57g26yjrDb5J2HZVaDYf85x_80rlzIcyrjTeyTg0LJDo22vD6zFk3OACsGA9gLBe61Hm21S4y432 R_6QfLGXKkyYG0Wungbc9xEQqZHMN2ZANx5rLnCFcvfBc1QeaX.wZpq7TgDIl.h4Lo.wTVNFDEn2 ZDl440pfrs3Ms6QrgapM3PxN3pS1ZaYO6KZutNVskcr.BrYCz3bSnvtbdn2SYUBMWtmQffnDdgnm pOOzWBvIp9bRgJEP4Gv8coL6dhCRoBp_Xz7GIAaoUcDYiDLB4JY1fq75udthJneVL2RBSnO4FZN5 vKzhzyqRPFmYJRSumAewfFHxpTGaG1K9oa4iV3lQzD4i4OhIqaDBSZGmkSHcVq.y4usGbvH1QdZX BOV5ZPm.U1BARG__KD2rINA2b23tctlR3CEU2SkG0uxRbybBrkETI_tqm80WM_WOij4J1UkDj_PS 17LbbhlpypcSEl96YdY6lKKLTq7tKKlR6VPFC6ORUj8HTnfE4cK8UBIN93.3ZX2LND23GtgUxKLI TW9vQfSqa6Ofy_Lu24Vc4yjBNcRi0Tetd_IPdRMecBkvNnq3z2Xg9sJzlBt0hveye6q3us_rfD2d LZCcDTmOJfeCY7cSivnDZQ4Rwgy7nZx6eTi3qBH8YWVYXOU8D8oAzy0PAe3FQFsRdcjk5BQi9b4z 8NMi2C6nkZXl86t0BJ1SkZ1knSnHMiowIU0x81SJ0R7IGpTsoEEFF9yAhjHn5kM2UCwVGWyQqt1j 6gAwF2T0sr1SiUvequPkveZ3RNuM3dFZ4Q5vzOIhowoz0mafo82G1y0heDKcdA8LEwpFnrEcFiun eCd88glvoIvKHy.AgRVs__zOgsPlPNVyHtCDoY773xzkMgPqPfQtkBBkwTKc.3AJtuVb1JW_obxS nv7hF2scjzJQhJNIH6bv8SISaqGKiuZIgBLkAJWBAUX3c7NI1GP7mz.qe.R7AF0I72KM5KGZiWN0 Soxv6CQPd58xh.T8dLq.agTaJyUVTkE5x5YlCOXPsn57LxOGVZeYLaDZ0Kh8jIJ1J4s.5J.FRo8J mRGZQrjht.40GX08Sdij5IpCa6vFhIFLt.T_XzPUW30YZHFOkg3r8BrJ.cEotE.mSahNfr2_.znF dGM18S1NLOmuNFkqh9_RAkidceoaBwHk8Uqmuhz8iv2UFw0UDJgqApormtZcB0uP.RpuglrS3TpM J4cEo4Xzgj5gjqkd4RMp9Tluaw6v9E77LllUJ Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ir2.yahoo.com with HTTP; Thu, 2 Jul 2020 13:56:42 +0000 Date: Thu, 2 Jul 2020 13:56:39 +0000 (UTC) From: Andrea Corallo Message-ID: <705260433.2731607.1593698199171@mail.yahoo.com> In-Reply-To: <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 965 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 2 juli 2020 kl. 12.59 skrev Andrea Corallo : > >>> I still wonder if there is any reason to limit arithmetic constant >>> folding to the portable fixnum range. Given that we don't evaluate >>> fixnump or bignump at compile-time, what observable effects would >>> constant-folding, say, (ash 1 32) have? Advice from deeper thinkers >>> solicited! >> >> I always thought the general idea is to respect the allocation side >> effect we have creating a bignum.=C2=A0 Not sure if the class of example= you >> have in mind here fits this case. > > Number allocation isn't a semantically visible effect and we probably > don't want to change that. Well is cons allocation a semantically visible effect then?=C2=A0 How is it different? I thought the reason why cons is not constant folded is to respect the allocation side effect, at least that's what I convinced my-self of :) =C2=A0 Andrea From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 14:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15937014853731 (code B ref 42147); Thu, 02 Jul 2020 14:52:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 14:51:25 +0000 Received: from localhost ([127.0.0.1]:55501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr0Ye-0000y5-NP for submit@debbugs.gnu.org; Thu, 02 Jul 2020 10:51:24 -0400 Received: from mail1435c50.megamailservers.eu ([91.136.14.35]:56118 helo=mail263c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr0Yb-0000xr-VL for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 10:51:23 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593701467; bh=S/WWDQln/Z5lIpubRLuuCmORemJZCo2nQJYzWM8OwSo=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=MB4ACAPqi9wpcmdOhsnw5mhm+st1Dff+dBFKjVkti51OasVy2+eKJ7OaUFdxzrRrU 0+R+Cdj54itK+gQz6kIqYb4P9V3Z/VyJqicIZnbTcYFQqfXZC+i2+1kY+PdSkcAy2O qf/sfCTRswGdUBXPOV9Q+DNpmeEKkYemyQ0gzVKE= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 062Ep3Wo002570; Thu, 2 Jul 2020 14:51:05 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <705260433.2731607.1593698199171@mail.yahoo.com> Date: Thu, 2 Jul 2020 16:51:03 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F26.5EFDF45B.0033, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=e6d4tph/ c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=LW-2j2PazT-2T_-krbcA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 2 juli 2020 kl. 15.56 skrev Andrea Corallo : > Well is cons allocation a semantically visible effect then? How is it > different? Conses are mutable and thus each have their own identity. Numbers are immutable and have none; there is no defined way to distinguish two numbers that have the same value ('eq' does not give well-defi [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 2 juli 2020 kl. 15.56 skrev Andrea Corallo : > Well is cons allocation a semantically visible effect then? How is it > different? Conses are mutable and thus each have their own identity. Numbers are = immutable and have none; there is no defined way to distinguish two = numbers that have the same value ('eq' does not give well-defined = results). The compiler is free to, and does, deduplicate equal bignums. = For instance, try (disassemble (lambda () (list 18723645817263338474859 = 18723645817263338474859))) and you will see that the resulting code will only contain one instance = of the number. > I thought the reason why cons is not constant folded is to respect the > allocation side effect, at least that's what I convinced my-self of :) Yes, in the sense that (defun f () (cons 'a 'b)) produces a fresh (a . b) each time (f) is called, because the returned = values can be distinguished both explicitly by 'eq' and by mutating it = and observing whether the change affects previously returned values or = not. Neither works for numbers. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 15:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15937039797535 (code B ref 42147); Thu, 02 Jul 2020 15:33:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 15:32:59 +0000 Received: from localhost ([127.0.0.1]:55522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr1Ct-0001xS-N7 for submit@debbugs.gnu.org; Thu, 02 Jul 2020 11:32:59 -0400 Received: from sonic303-20.consmr.mail.ir2.yahoo.com ([77.238.178.201]:44458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr1Cp-0001xB-Bh for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 11:32:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593703968; bh=hbH+ovjFVaV5ljwd0kVYvIVckpO3FRueZG6MeNCS8Js=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=VPmz7n6HAl87zta+/Hh41afmyhaEEtxaOoa7lCEYa8OiijDCnq5wDc7fyyJsJ/zN1V4HZXWklXggx7L6EUE5swkQUmsROV5QoPmvAkujY41ChGt/tKx9K1zg7MDh85lJ8GYH+5u0k/fGJublQ6UYb8d18gRU/kR+B0v+naWI0dVK4ziUIP1pHeXQunUZ19ZEfIvfS6eWN0u8rYVn4COoBTsBbVSeCVNljwRTiPtDNvdb6sHbZmIXVTjYtzYoD3a+dIlSIpvtJcnxNNCwcXhBUT4sxP2l1uqWgX7gHsd4culDzRFPWyRQ1ewdYjj4wQ3gxfHsrzGERa0qikQutkU6Dg== X-YMail-OSG: CQ5Ve80VM1krbjZyAlw2p7Y0U1KKdvtlRrvlRK0jDKq7BEBrXa.vkOjVC02yB5k greJ8FQGh.3c7QoRJ0cZjzm8M5NzpjcHOMr3W3fEXJqmYlFw6EURSPKBq3L9MSjV60pwiYvcyObZ M_G43sO5RHzhgeBdRIh3VnwDM65vgod7veN.Jzv98ukBejAHdKdzbjYv.3.2oRw0CgUZMBg_TcDk XhbOdcIJlXGaxGwvhopWoB5e4PatQiWap8zhFyyQ0NTW6mDctdtQb_s3fLB2J0g3arebe4OEvBvP Z6jyENAkwJLKSZWjhijGo8TT1Z2MoJzgftJS2b8DadBl7OiZYbCHP5yJbzuPjXjmTsVN3X8N9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mail.ir2.yahoo.com with HTTP; Thu, 2 Jul 2020 15:32:48 +0000 Date: Thu, 2 Jul 2020 15:32:48 +0000 (UTC) From: Andrea Corallo Message-ID: <914228346.2847475.1593703968254@mail.yahoo.com> In-Reply-To: <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 623 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: >> I thought the reason why cons is not constant folded is to respect the >> allocation side effect, at least that's what I convinced my-self of :) > > Yes, in the sense that > >=C2=A0 (defun f () (cons 'a 'b)) > > produces a fresh (a . b) each time (f) is called, because the returned > values can be distinguished both explicitly by 'eq' and by mutating it > and observing whether the change affects previously returned values or > not. Neither works for numbers. Understand makes perfectly sense.=C2=A0 Cons allocation is something very visible in Lisp. =C2=A0 Andrea From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 15:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15937049558995 (code B ref 42147); Thu, 02 Jul 2020 15:50:01 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 15:49:15 +0000 Received: from localhost ([127.0.0.1]:55538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr1Sd-0002L1-NV for submit@debbugs.gnu.org; Thu, 02 Jul 2020 11:49:15 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr1Sb-0002Ko-NU for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 11:49:14 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0F33510033A; Thu, 2 Jul 2020 11:49:08 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4182D10004D; Thu, 2 Jul 2020 11:49:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593704946; bh=uRGwE9Ts0E74fVdYxnIWj8UkSXpsTaY5gC/Z5fZXJ7s=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=c/+cQ1iWsmyvDYrfSlrEuchHYggmX5dvaVb6nRYVJePpNBnn6fDnsCQetH3HIH7f6 WehgBdVxPOyc6zS5qRVchnZ6z99CnS6hhlUqUolqT7C7q9UMktfZV7beRSeekEKbB2 3/B6gz4wNWyuIJwSiSx8znepUetBN+DSVWAH6qKZ4d3jbpVQX+Eg725iTmsbx5NMON EowLyD9nxyYpekwS/VUWY6G7fBrGXp+aKwbCK+sxq+YcvAbumOEkAB/1XuxuZpkGty btKHTapqPqxjf75G0sKwmnFHb5nbJ43+LA3p2lXrCNIM0S9kojgkysQsH90/0DDl/5 /0Hjxf8Usk9ew== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C72A2120736; Thu, 2 Jul 2020 11:49:05 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> Date: Thu, 02 Jul 2020 11:49:04 -0400 In-Reply-To: <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Thu, 2 Jul 2020 16:51:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.028 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Conses are mutable and thus each have their own identity. Numbers are > immutable and have none; there is no defined way to distinguish two numbers > that have the same value ('eq' does not give well-defined results). Better yet, there's still hope that we change things such that `eq` behaves like `eql` on bignums (and maybe also on floats). Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 18:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159371290521619 (code B ref 42147); Thu, 02 Jul 2020 18:02:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 18:01:45 +0000 Received: from localhost ([127.0.0.1]:55602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr3Wr-0005cc-8s for submit@debbugs.gnu.org; Thu, 02 Jul 2020 14:01:45 -0400 Received: from mail78c50.megamailservers.eu ([91.136.10.88]:54650 helo=mail70c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr3Wn-0005cQ-Ru for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 14:01:44 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593712888; bh=yBtA0ffVrxKbf3Yz/c6JwQqy7d9/XJZ018ciqCnQ73Y=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=qfz5IHWfVhOnIXFS0YUVKckkiguSJAPX5e/cisP4OrAUGWHJcATivtsNo9Gbx/ue6 zT31L7GGioyqYxSHv1Zo7q8l5UFLAJdWej2Trl/wGg5fOzR8TAcLInxzONimMw4qlQ HI/MXaXDqFCUNzgqIRHvpsK/9bFMs0AZB+GTg7m0= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 062I1Od6022760; Thu, 2 Jul 2020 18:01:26 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_B6B517BA-361B-4B68-989C-2951E6CEB764" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Date: Thu, 2 Jul 2020 20:01:23 +0200 In-Reply-To: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F18.5EFE205C.0056, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OKBZIhSB c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=0cJY2SJWCGIAinVouL8A:9 a=QEXdDO2ut3YA:10 a=G1v6qB2zTqRmA-GjKukA:9 a=B2y7HmGcmWMA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 2 juli 2020 kl. 17.49 skrev Stefan Monnier : > Better yet, there's still hope that we change things such that `eq` > behaves like `eql` on bignums (and maybe also on floats). Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_B6B517BA-361B-4B68-989C-2951E6CEB764 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 2 juli 2020 kl. 17.49 skrev Stefan Monnier : > Better yet, there's still hope that we change things such that `eq` > behaves like `eql` on bignums (and maybe also on floats). Speaking of which, Andrea may be in a good position to provide us with = performance data about such a change, since making 'eq' more expensive = is likely to be more visible in native code (assuming the operation is = open-coded) than in bytecode or interpreted lisp. On the other hand, = perhaps his compiler thingamajig is able to eliminate some checks = statically by type propagation? Anyway, since we now have bignums and have standardised on IEEE 754 = binary64 floats, is there a reason to keep byte-opt-portable-numberp? If we want to make allowance for capricious x87 rounding, what about = rewriting it to accept integral floats in the =C2=B12^53 range, as well = as any integer? This is what it might look like: --Apple-Mail=_B6B517BA-361B-4B68-989C-2951E6CEB764 Content-Disposition: attachment; filename=0001-Relax-portable-number-predicate-in-byte-compiler.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Relax-portable-number-predicate-in-byte-compiler.patch" Content-Transfer-Encoding: quoted-printable =46rom=20745752478c7ab895390a671ee4f7712eedf46bcc=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Thu,=202=20Jul=202020=2019:54:56=20+0200=0A= Subject:=20[PATCH]=20Relax=20portable=20number=20predicate=20in=20= byte-compiler=0A=0ASince=20Emacs=20has=20standardised=20on=20IEEE754=20= binary64,=20and=20the=20range=20of=0Aintegers=20is=20no=20longer=20= platform-dependent,=20all=20numbers=20are=20portable.=0ARetain=20a=20= restriction=20of=20floats=20to=20integers=20in=20[-2^53,2^53]=20to=20be=0A= safe=20against=20x87=20rounding=20errors=20(bug#42147).=0A=0A*=20= lisp/emacs-lisp/byte-opt.el=20(byte-opt--max-integral-float):=0A= (byte-opt--min-integral-float):=0A(byte-opt--portable-max):=0A= (byte-opt--portable-min):=0A(byte-opt--portable-numberp):=0A---=0A=20= lisp/emacs-lisp/byte-opt.el=20|=2027=20+++++++++++++--------------=0A=20= 1=20file=20changed,=2013=20insertions(+),=2014=20deletions(-)=0A=0Adiff=20= --git=20a/lisp/emacs-lisp/byte-opt.el=20b/lisp/emacs-lisp/byte-opt.el=0A= index=2072c68d64b2..2c7a23ebed=20100644=0A---=20= a/lisp/emacs-lisp/byte-opt.el=0A+++=20b/lisp/emacs-lisp/byte-opt.el=0A@@=20= -672,23=20+672,22=20@@=20byte-optimize-associative-math=0A=20=09=20=20=20= =20(apply=20(car=20form)=20constants))=0A=20=09form)))=0A=20=0A-;;=20= Portable=20Emacs=20integers=20fall=20in=20this=20range.=0A-(defconst=20= byte-opt--portable-max=20#x1fffffff)=0A-(defconst=20= byte-opt--portable-min=20(-=20-1=20byte-opt--portable-max))=0A+;;=20= Bounds=20of=20consecutive=20integers=20representable=20as=20floats.=0A= +;;=20These=20assume=20IEEE=20754=20binary64=20floats.=0A+(defconst=20= byte-opt--max-integral-float=20(float=20(ash=201=2053)))=0A+(defconst=20= byte-opt--min-integral-float=20(-=20byte-opt--max-integral-float))=0A=20=0A= =20;;=20True=20if=20N=20is=20a=20number=20that=20works=20the=20same=20on=20= all=20Emacs=20platforms.=0A-;;=20Portable=20Emacs=20fixnums=20are=20= exactly=20representable=20as=20floats=20on=20all=0A-;;=20Emacs=20= platforms,=20and=20(except=20for=20-0.0)=20any=20floating-point=20number=0A= -;;=20that=20equals=20one=20of=20these=20integers=20must=20be=20the=20= same=20on=20all=0A-;;=20platforms.=20=20Although=20other=20= floating-point=20numbers=20such=20as=200.5=20are=0A-;;=20also=20= portable,=20it=20can=20be=20tricky=20to=20characterize=20them=20portably=20= so=0A-;;=20they=20are=20not=20optimized.=0A+;;=20As=20long=20as=20we=20= need=20to=20support=2032-bit=20x86=20(using=20x87=20floats),=20we=20= cannot=0A+;;=20be=20certain=20that=20the=20result=20is=20portable=20to=20= the=20last=20bit=20for=20all=20values;=0A+;;=20therefore,=20we=20only=20= consider=20integral=20floats=20to=20be=20'portable'.=0A=20(defun=20= byte-opt--portable-numberp=20(n)=0A-=20=20(and=20(numberp=20n)=0A-=20=20=20= =20=20=20=20(<=3D=20byte-opt--portable-min=20n=20byte-opt--portable-max)=0A= -=20=20=20=20=20=20=20(=3D=20n=20(floor=20n))=0A-=20=20=20=20=20=20=20= (not=20(and=20(floatp=20n)=20(zerop=20n)=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(condition-case=20()=20(<=20(/=20n)=200)=20= (error))))))=0A+=20=20(or=20(integerp=20n)=0A+=20=20=20=20=20=20(and=20= (floatp=20n)=0A+=20=20=20=20=20=20=20=20=20=20=20(ignore-errors=20(=3D=20= n=20(floor=20n)))=0A+=20=20=20=20=20=20=20=20=20=20=20(<=3D=20= byte-opt--min-integral-float=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20n=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= byte-opt--max-integral-float))))=0A=20=0A=20;;=20Use=20OP=20to=20reduce=20= any=20leading=20prefix=20of=20portable=20numbers=20in=20the=20list=0A=20= ;;=20(cons=20ACCUM=20ARGS)=20down=20to=20a=20single=20portable=20number,=20= and=20return=20the=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_B6B517BA-361B-4B68-989C-2951E6CEB764-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 18:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159371613826659 (code B ref 42147); Thu, 02 Jul 2020 18:56:01 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 18:55:38 +0000 Received: from localhost ([127.0.0.1]:55665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr4Mz-0006vv-UH for submit@debbugs.gnu.org; Thu, 02 Jul 2020 14:55:38 -0400 Received: from sonic313-21.consmr.mail.ir2.yahoo.com ([77.238.179.188]:41614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr4Mw-0006vg-Sh for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 14:55:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593716128; bh=m/Ei9xF1mM3Q56WwNowmOeYDxdmz/+WlYcn8a5zltVw=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HdQeW.wz2jNvwmgnDw5c9P2xWSeiD6.pEThxzNdUqoxna_CAWEwixVd.9WSndWNK .dIgKtBrKPUMUnDg7527MIR5wiq.8L_Hiuer_ehhg3uz_hyLdjQlby6dJDqMx.P9eqjRo84nRxjl kn8JwSG5C1rAzfkap6.226ZdBrDJXXryTA8K976zY45TBxBSZ0fpVGOBuBTlkaCx8JeQJfVBn_Fz SxTkljDGWOVhU9VRSF3UU0xwlhYFWmYVq4Wm4.cgBfN3PPb6mY3ReAtrNYRoFTNme4c3.YDjfknA fk4N1O1RLWP0BQS6v9dDWjfnNDh_axas7foE3nobaFW1CPHpzfapRSvHEP.QMUzvqiNfSu017lUP weEjWrJ6.FkIs67WOwr6f2USOoAW0tueAgBqtLySyz2O60x1seyWgeqNycB_n.Trji_i.i1Nbtjf wAceXseIVtFMqsMRTB8xqc94H3ElBqt0B4xhP2GmjLvS93YPzhaaQ..ErTmw.0JeHorz0Qumo03J _2ld_xm8So2MXoSikCw.3QMx4Ixq7jk50Qaa7vWw.D2lFooTnYB.ZrN4F6Irdrva.Z6SGzdEQY9U v1Y5RBpQHGod__Qz5uFE_eFAwhZwgtDZkrqbt1JO0oezSdt80jGq59qO.LNinKCN9olvznoJkmXf MGHO1IL_lzKLU_0HoCTBOk9RwI1Ub1zngZn4qIR8- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ir2.yahoo.com with HTTP; Thu, 2 Jul 2020 18:55:28 +0000 Date: Thu, 2 Jul 2020 18:55:23 +0000 (UTC) From: Andrea Corallo Message-ID: <117811516.3019881.1593716123601@mail.yahoo.com> In-Reply-To: <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 769 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 2 juli 2020 kl. 17.49 skrev Stefan Monnier : > >> Better yet, there's still hope that we change things such that `eq` >> behaves like `eql` on bignums (and maybe also on floats). > > Speaking of which, Andrea may be in a good position to provide us with > performance data about such a change, since making 'eq' more expensive > is likely to be more visible in native code (assuming the operation is > open-coded) than in bytecode or interpreted lisp. On the other hand, > perhaps his compiler thingamajig is able to eliminate some checks > statically by type propagation? Correct, in case we would certainly opencode it and use the thingamajig trying to eliminate the type checks we can. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 19:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159371696427986 (code B ref 42147); Thu, 02 Jul 2020 19:10:01 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 19:09:24 +0000 Received: from localhost ([127.0.0.1]:55680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr4aK-0007HJ-Cp for submit@debbugs.gnu.org; Thu, 02 Jul 2020 15:09:24 -0400 Received: from mail-oi1-f175.google.com ([209.85.167.175]:39708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr4aH-0007H4-PX for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 15:09:23 -0400 Received: by mail-oi1-f175.google.com with SMTP id w17so23845964oie.6 for <42147@debbugs.gnu.org>; Thu, 02 Jul 2020 12:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=x4S31wNhTpGkiWlwDKEfitxFEb7Gk1ORsbE1uSmpeAI=; b=pwXVs4BtEvAv9wKemI4hDlmB9CiGmUNgHjU8PjaUoEd1PT8GpOxC8yzxzH+6BJQSf4 oOf35p5BqNPMOD8nO25H29aNPK5TqWfZ3Xk2VDdnfFy2lXZ+Z4lZpbNbDPvQI41ot1LO 589WELbdj7+Ayem2tvjqNGlt2m4GGjFkKOaMhtyEsgC15nlaCz6UwlwZBviNegan3/b9 vcvmRLfqFFA2/w7ar4b5C0W+c0S5V+YLhu/HkvSya20ZEVJS5d2N9qlDC55+ba8fvMns if4ugbmlGmettb08uGhWmvyCjOgFDhFSEG4ZJZq8s0yj5SxUccXrQ+JUwDLQCvZ3mZ/l GfoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=x4S31wNhTpGkiWlwDKEfitxFEb7Gk1ORsbE1uSmpeAI=; b=QwJqaKV+aTYj6QaOoERYUKvmlnabfa9AGOoDFhTxAumNQkkfBTO6m3PVpvUxXb2l8w dCt2sLLxU32V6VOMnyPncl1agg6FaTjNE2GFtjAEqDD9hulnAxcTwKsUbuWSoQr3F9DJ n2lT4BuN0duXwJmn/AaDFSj6gYKVFl5FbbpNiOdv9e+tnIdB0vqTrk/SygvxB9YnC6OB l0VNMLjkLYw1GrVfZJTy4KUuAzroiKnpFyStYlRTYqj4agqcXqC63MGQeHhgiHa+806n m4Fq4cGQGQ4hSiIVCKTDL1aI7TidS/8M66tTMO8Ka9Qv9d1Y5hINndfxSOwnz7EhIb89 pwaw== X-Gm-Message-State: AOAM530aw+1PLVyo6fGX4FFlsoEwpE79R4ZD1pX2Mw0vfAS3jtoj1fkg SdJltBg4mwaHlnwiUOdJ0ZlkeiPsCsEzHFsq1Ic= X-Google-Smtp-Source: ABdhPJy+K3ecNpbXZ8+fifzSj1ImqAUYte/onLvXz1LJ3JFugC28xJQ7qn9/oo45GLMzr/4GduAxHb7bJI4j+XRxM4c= X-Received: by 2002:aca:b883:: with SMTP id i125mr25460052oif.65.1593716956073; Thu, 02 Jul 2020 12:09:16 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> In-Reply-To: From: Philipp Stephani Date: Thu, 2 Jul 2020 21:09:04 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am Do., 2. Juli 2020 um 12:28 Uhr schrieb Mattias Engdeg=C3=A5rd : > > 1 juli 2020 kl. 23.31 skrev Andrea Corallo : > > > Another reason why I'm interested is that I reuse these > > definitions in the native compiler. > > In that case there are probably more functions you may want to consider f= or purity -- what about: > > < > <=3D >=3D =3D /=3D > string< string=3D string-equal > eq eql equal > proper-list-p > identity > memq memql member > assq assql assoc I don't think most of those are pure, as they have to "look into" an object. For example, the result of "equal" does not only depend on the argument objects, but also the objects they refer to. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 19:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159371871730866 (code B ref 42147); Thu, 02 Jul 2020 19:39:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 19:38:37 +0000 Received: from localhost ([127.0.0.1]:55705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr52a-00081m-UD for submit@debbugs.gnu.org; Thu, 02 Jul 2020 15:38:37 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr52Z-00081a-L4 for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 15:38:36 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0EF3B101582; Thu, 2 Jul 2020 15:38:30 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DC8FA1012BA; Thu, 2 Jul 2020 15:38:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593718707; bh=no5cSDSvyZshCCffRhEKBXZrIujSt8l4kHsloNKlXZA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=O67d/iXOT0GQ7B92nkDmLgcX5hEblXfOQvHyMouCnmshAj3A0UJ3iO9UZOr0Zd7fH dNoyc50Oi3+tfeqxWEGf/ApZ5m70TI6LsoHJNCbw36MWpynYK0kl5toyBOI1AkFKgz Y/a8rXi06B+wP8z+TK1U+0pzVpQzT4TWxwKx90fqqadHTwhu6VP2fjPF1yu81bv9pb 4AG/VoH8CP3YAJdjrfxsWRvJvaxdogtU8aZBEdzou2uYsxQkcOfBkCgHig+b/KU0wN 6DKmpdbo7MOUIF89mF+Rtd3h2YBgROsVx3EkghiSTUuvIYXk4xBAdnx/tdCNoJVhOa PZ3WAV4MRfdgA== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 882DF120778; Thu, 2 Jul 2020 15:38:27 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> Date: Thu, 02 Jul 2020 15:38:25 -0400 In-Reply-To: <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Thu, 2 Jul 2020 20:01:23 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.028 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> Better yet, there's still hope that we change things such that `eq` >> behaves like `eql` on bignums (and maybe also on floats). > Speaking of which, Andrea may be in a good position to provide us with > performance data about such a change, since making 'eq' more expensive is > likely to be more visible in native code (assuming the operation is > open-coded) than in bytecode or interpreted lisp. On the other hand, perhaps > his compiler thingamajig is able to eliminate some checks statically by > type propagation? Note that it can also be done without slowing down `eq` (by hash-consing the bignums). Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 20:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15937205911174 (code B ref 42147); Thu, 02 Jul 2020 20:10:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 20:09:51 +0000 Received: from localhost ([127.0.0.1]:55709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr5Wp-0000Is-AF for submit@debbugs.gnu.org; Thu, 02 Jul 2020 16:09:51 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr5Wl-0000Ic-Gh for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 16:09:49 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 32ED31600C8; Thu, 2 Jul 2020 13:09:41 -0700 (PDT) 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 MCkPOCVX--8z; Thu, 2 Jul 2020 13:09:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7CCE91600FC; Thu, 2 Jul 2020 13:09:40 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 4PptfLoPb_2y; Thu, 2 Jul 2020 13:09:40 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4C0B71600C8; Thu, 2 Jul 2020 13:09:40 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735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ID: <43ce844e-b239-0c39-ad4f-86fec376f945@cs.ucla.edu> Date: Thu, 2 Jul 2020 13:09:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/2/20 12:38 PM, Stefan Monnier wrote: > Note that it can also be done without slowing down `eq` (by > hash-consing the bignums). Yes, that's a better way to go. I wrote a patch to do that a while ago but never got around to the laborious part, which was benchmarking. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 20:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier Cc: Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15937219333449 (code B ref 42147); Thu, 02 Jul 2020 20:33:01 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 20:32:13 +0000 Received: from localhost ([127.0.0.1]:55757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr5sS-0000tY-FT for submit@debbugs.gnu.org; Thu, 02 Jul 2020 16:32:13 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr5sM-0000t0-Vy for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 16:32:11 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id AAAC31600C8; Thu, 2 Jul 2020 13:32:00 -0700 (PDT) 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 nXlMXDIMIOtD; Thu, 2 Jul 2020 13:31:57 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C38291600FC; Thu, 2 Jul 2020 13:31:57 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 jtyZSJpHkTHl; Thu, 2 Jul 2020 13:31:57 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 908B11600C8; Thu, 2 Jul 2020 13:31:57 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU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WGdVOUJ6a2s4NVVHCmJQRWQ3SEdGL1ZTZUhDUXdXb3U2anFVRFRTRHZuOVloTlRkRzBLWFBN NzRhQyt4cjJab3cxTzJtaFhpaGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: Date: Thu, 2 Jul 2020 13:31:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/2/20 11:01 AM, Mattias Engdeg=C3=A5rd wrote: > If we want to make allowance for capricious x87 rounding, what about re= writing it to accept integral floats in the =C2=B12^53 range, as well as = any integer? This is what it might look like: Another plausible option would be for Emacs to drop support for x87 round= ing, in the interest of portability. All Apple Intel machines have had SSE2, Micr= osoft has been requiring SSE2 by default since MSVC 2012, and it's easy enough = to do the same with GCC and clang. We'd be in good company as lots of other software packages have dropped s= upport for non-SSE2 machines, including Cygwin, Java, OpenOffice, PostgreSQL, Py= thon, QEMU, Thunderbird, VirtualBox; see . From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 21:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159372610418238 (code B ref 42147); Thu, 02 Jul 2020 21:42:01 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 21:41:44 +0000 Received: from localhost ([127.0.0.1]:55856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr6xk-0004k6-3I for submit@debbugs.gnu.org; Thu, 02 Jul 2020 17:41:44 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr6xg-0004jr-HL for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 17:41:42 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D941F440F0F; Thu, 2 Jul 2020 17:41:34 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A1DF6440EBA; Thu, 2 Jul 2020 17:41:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593726093; bh=5qA++KqtxiOQo1XXnWs/vC9aQOjwsalXLiPgJ/NlWOU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BkFyvF3RI2VVgutsaI288Z3VwV09vQr9poNynh9rXT+Fy2e12M0TxfImTD+b5osJH YuVcir21W8hxjpxD9BIKFUZgEZUCkmKh5Iw1E07YEWoqYlYzeyrtbhqcC3jvvrQUTJ ii7y5bj4Kj2K6e0+9E8vTB8HEqOSLne9D+w4Op+S3woLEwigBcoHeLd2RKf4nDHdFG U7oXZWMHI3Rz+N5bGl3Edbf2129UcNCEA0Lnj58fiXZ6pya7PtAMUruhRZrKj0moaG pNO4hQFQbSD3+ObXoUVtzHAcMrY5sI1COn7WOZ+E14Pf5uZGQDgvyKEtb/JrOY9Vdo 60+OP913Lf5fw== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 030EF120439; Thu, 2 Jul 2020 17:41:32 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> Date: Thu, 02 Jul 2020 17:41:31 -0400 In-Reply-To: <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Thu, 2 Jul 2020 20:01:23 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.038 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Anyway, since we now have bignums and have standardised on IEEE 754 binar= y64 > floats, is there a reason to keep byte-opt-portable-numberp? Indeed, it seems like it might not be needed any more. > If we want to make allowance for capricious x87 rounding, what about > rewriting it to accept integral floats in the =B12^53 range, as well as a= ny > integer? This is what it might look like: I must say I don't know what x87 rounding has to do with it. I'd tend to assume that x87 rounding can virtually never be seen from Elisp because it's hard to imagine how the C compiler will manage to keep our Elisp floats long enough in the x87 stack to avoid rounding back to 64bit floats between every Elisp-level operation. Or are we worried about the double-rounding of x87? Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jul 2020 23:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159373177526793 (code B ref 42147); Thu, 02 Jul 2020 23:17:02 +0000 Received: (at 42147) by debbugs.gnu.org; 2 Jul 2020 23:16:15 +0000 Received: from localhost ([127.0.0.1]:55900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr8RC-0006y4-T9 for submit@debbugs.gnu.org; Thu, 02 Jul 2020 19:16:15 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jr8RA-0006xo-7g for 42147@debbugs.gnu.org; Thu, 02 Jul 2020 19:16:13 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E1FA91600C3; Thu, 2 Jul 2020 16:16:05 -0700 (PDT) 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 bmWGKnCZyd28; Thu, 2 Jul 2020 16:16:05 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 28C1A1600C4; Thu, 2 Jul 2020 16:16:05 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 SzolEihRuuZt; Thu, 2 Jul 2020 16:16:05 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EF0FA1600C3; Thu, 2 Jul 2020 16:16:04 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 M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zN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> Date: Thu, 2 Jul 2020 16:16:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/2/20 2:41 PM, Stefan Monnier wrote: > I'd tend to assume that x87 rounding can virtually never be seen from > Elisp because it's hard to imagine how the C compiler will manage to > keep our Elisp floats long enough in the x87 stack to avoid rounding > back to 64bit floats between every Elisp-level operation. It can happen in floatop_arith_driver, which has an accumulator of type 'double' that on x87 is put into an 80-bit register. For example, on x86+x87 compiled with the usual gcc -O2, (+ 1e16 2.9999 2.9999) returns 10000000000000008.0 (the exact answer rounded to 'double'), whereas with SSE2 the same expression yields 10000000000000004.0 (which is a bit off, because the accumulator is only 64 bits and suffered from rounding intermediate results). > Or are we worried about the double-rounding of x87? That too. For example, with x87, (+ 1e16 2.9999) yields 10000000000000004.0 due to double-rounding, whereas with SSE2 the same expression yields 10000000000000002.0 which is the correctly-rounded answer. As you can see, sometimes SSE2 is closer to the mathematically-correct answer and sometimes x87 is. In typical C math code, x87 is better; in Emacs I imagine the reverse is true (for the reasons you mentioned), though I have not attempted to measure this. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 08:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159376519217061 (code B ref 42147); Fri, 03 Jul 2020 08:34:01 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 08:33:12 +0000 Received: from localhost ([127.0.0.1]:56389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrH8C-0004R7-EE for submit@debbugs.gnu.org; Fri, 03 Jul 2020 04:33:12 -0400 Received: from mail78c50.megamailservers.eu ([91.136.10.88]:60490 helo=mail70c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrH87-0004Qu-Hy for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 04:33:11 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593765182; bh=w28gfoYULD+nGXf7QJeXJ5QbYZqR1WWbH2yWJS34D2E=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=sfm0v7ilZeDRVgO0Kd7RUHvH/UGnGeaYFNRR0ikNEFd9x2NNQiEpTdQAKxYxkjIKw 67OnLPpu5g0ahwZNSZKPG840MfRSEkVnr9tY6uRqUWfwiuSwYVksNoHodvggaddeYP 8JwsKZ6y9bNkno1IF2n3n4aenDCvSrFKmjnevByY= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 0638WvYW025523; Fri, 3 Jul 2020 08:32:59 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> Date: Fri, 3 Jul 2020 10:32:56 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F24.5EFEECB9.0069, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OKBZIhSB c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=2YIUIZ3jAAAA:8 a=ZzRdP2rEuLaPOZdU1cIA:9 a=CjuIK1q_8ugA:10 a=r0Ai7q2SEVf7W-GEcfLe:22 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 3 juli 2020 kl. 01.16 skrev Paul Eggert : > As you can see, sometimes SSE2 is closer to the mathematically-correct answer > and sometimes x87 is. In typical C math code, x87 is better; in Emacs I imagine > the reverse is true (for the reasons [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 3 juli 2020 kl. 01.16 skrev Paul Eggert : > As you can see, sometimes SSE2 is closer to the mathematically-correct = answer > and sometimes x87 is. In typical C math code, x87 is better; in Emacs = I imagine > the reverse is true (for the reasons you mentioned), though I have not = attempted > to measure this. Thanks for the examples and these were indeed what I had in mind = (there's also the effect from having a greater exponent range in the = intermediate result); Monniaux [1] is a good reference. In practice, the extra precision of x87 code is so unreliable and fickle = (unless the 80-bit long double is used throughout) that it's almost = never worth it. (Being much slower doesn't help either.) Fortunately modern compilers generate SSE code by default, only passing = return values on the x87 stack as per the x86 ABI (which causes no = harm). This reduces an already tiny risk to nil. We could add an = elaborate configure or run-time test and admonishments to the = installation instructions but frankly we have better use of our time. I = suggest we replace byte-opt--portable-numberp with numberp (or nothing = at all, depending on where it occurs) and be done with it. --- [1] = https://hal.archives-ouvertes.fr/hal-00128124/file/floating-point-article.= pdf From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 09:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Stephani Cc: Paul Eggert , Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159376834922020 (code B ref 42147); Fri, 03 Jul 2020 09:26:01 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 09:25:49 +0000 Received: from localhost ([127.0.0.1]:56428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrHx7-0005j6-1i for submit@debbugs.gnu.org; Fri, 03 Jul 2020 05:25:49 -0400 Received: from mail200c50.megamailservers.eu ([91.136.10.210]:40564 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrHx2-0005iv-Mz for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 05:25:47 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593768334; bh=+DTgZ+RByBBBS8EBS/hIBkYnCzqS6JBZ3beP8cu5yxs=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=kwFeScxc2/xYMBoVOOABU7aCXH3PAuYqNM3tCcTPdMgbf4c+tfX/IiLVVkKE3wkUz Mb120q6sKhVOPnCwvqlV8BQW+WzhVAGSwiCVJfpyrZCrKhl07kyN3vzpZId9zJAeQ5 qVZl2kOP770WuhdxDn1Ur0zhEou/ANMRgULl25EA= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 0639PV6q017180; Fri, 3 Jul 2020 09:25:32 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Fri, 3 Jul 2020 11:25:30 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F26.5EFEF98E.006A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=cM2eTWWN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=85C4niJsIxtT7SGL8ocA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 2 juli 2020 kl. 21.09 skrev Philipp Stephani : > I don't think most of those are pure, as they have to "look into" an > object. For example, the result of "equal" does not only depend on the > argument objects, but also the objects they refer to. Unless I'm mistaken, they are pure enough for the purpose of constant = folding, where the arguments are already known (constant) at = compile-time; do come with a counter-example if you disagree. Were you thinking about other uses of pure functions? Perhaps our notion = of purity is underspecified. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 09:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159376877522773 (code B ref 42147); Fri, 03 Jul 2020 09:33:02 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 09:32:55 +0000 Received: from localhost ([127.0.0.1]:56455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrI3z-0005vF-C2 for submit@debbugs.gnu.org; Fri, 03 Jul 2020 05:32:55 -0400 Received: from mail1467c50.megamailservers.eu ([91.136.14.67]:47364 helo=mail268c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrI3x-0005ur-4R for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 05:32:53 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593768758; bh=iDP9TvKcQqQ4k82/ewPawmNLZDDUv18+52BzAyJPwFg=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=qLyfsYV1tOa2dvIT1MwyZhPIr2rYsv/wLqfH1MG3F1QmoH4XGOuk9FC2gyVgF9Amp DL8UEDSOO/SBJtkUVUBClVzbZHQSJBTkzm+79xtOPGccAWNZDKLPBfxaOzTUkX4hSs 2aQjbZTGCWa6AW29NGjPfJwGAA3AYmY0WyxQJYjU= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 0639WZ5w001874; Fri, 3 Jul 2020 09:32:37 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <43ce844e-b239-0c39-ad4f-86fec376f945@cs.ucla.edu> Date: Fri, 3 Jul 2020 11:32:35 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <2CEB4A36-3DDF-4868-B8E0-B6AC35C1DFAF@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <43ce844e-b239-0c39-ad4f-86fec376f945@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F26.5EFEFB36.007D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=BZ+mLYl2 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=s-JEzVKBLHgALf_x9nkA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 2 juli 2020 kl. 22.09 skrev Paul Eggert : >> Note that it can also be done without slowing down `eq` (by >> hash-consing the bignums). > > Yes, that's a better way to go. I wrote a patch to do that a while ago but never > got around to the la [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 2 juli 2020 kl. 22.09 skrev Paul Eggert : >> Note that it can also be done without slowing down `eq` (by >> hash-consing the bignums). >=20 > Yes, that's a better way to go. I wrote a patch to do that a while ago = but never > got around to the laborious part, which was benchmarking. Hash-consing bignums may be a good idea (I'm neutral on the idea), but = there could be a reason why it isn't very commonly seen in other = runtimes; perhaps they have more efficient GCs (generational and/or = incremental), but Emacs would benefit (a lot) from that, too. In any case, it's a one-way decision: once we guarantee eq to provide = numerical equality (whether by hash-consing or otherwise), there is no = way back. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 13:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159378190620878 (code B ref 42147); Fri, 03 Jul 2020 13:12:02 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 13:11:46 +0000 Received: from localhost ([127.0.0.1]:56633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrLTm-0005Qg-EG for submit@debbugs.gnu.org; Fri, 03 Jul 2020 09:11:46 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrLTi-0005QM-O1 for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 09:11:44 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 00D6680ECE; Fri, 3 Jul 2020 09:11:37 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9399380AED; Fri, 3 Jul 2020 09:11:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593781890; bh=AWS3gMRMpaIcwlujzfdxyPQzU6tYFgzngCoxya2HfCg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ZiLo79JCzxCM2979/9dRq8RO1zNUnZOfvFJLRwP8VuBFSeJ83P44wtge7Tv9gf5+h 2ik6asIHbzyo6hsaHNZSo0MTfBjIIzPUS83LDgWDyOPe8oMwVemG0NoDlDXHuhCzxZ rDKXm4tfoXdwyN+aJpPgELLb76l1jz19lTDgRZTyJR2Kt2ZeOmCyLL2PT5sjeZGAg+ wsEXXukaD6CkXLbI19eLYLPPBJSNfBVG32AiivnU6ZbMlTypWvsGxAtgFf2cYEho/t GhkCIr0W49WYmaM2nKv1HfeCKxsj51pkiLxnGQMhUO5XGxCOO4VDg78XddmVFNMecU PC3BsZo3eVHLQ== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4AB641203B5; Fri, 3 Jul 2020 09:11:30 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> Date: Fri, 03 Jul 2020 09:11:29 -0400 In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Fri, 3 Jul 2020 10:32:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.019 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Fortunately modern compilers generate SSE code by default, only passing > return values on the x87 stack as per the x86 ABI (which causes no > harm). This reduces an already tiny risk to nil. We could add an elaborate > configure or run-time test and admonishments to the installation > instructions but frankly we have better use of our time. I suggest we > replace byte-opt--portable-numberp with numberp (or nothing at all, > depending on where it occurs) and be done with it. Agreed, Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: Hash-consing bignums (was: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?) Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 13:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159378357723549 (code B ref 42147); Fri, 03 Jul 2020 13:40:01 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 13:39:37 +0000 Received: from localhost ([127.0.0.1]:56645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrLuj-00067l-3z for submit@debbugs.gnu.org; Fri, 03 Jul 2020 09:39:37 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:23570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrLub-00067O-HU for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 09:39:36 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AE018440F60; Fri, 3 Jul 2020 09:39:23 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C435E440F5E; Fri, 3 Jul 2020 09:39:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593783557; bh=LL3QeBM9SDOjvTT11fgRJj0SyHDUQ7leV6BLGcg9sS0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=HaEbWtxX+7nli3msrqWpO9sMZ3nNFQwFNIC2F+hJkwL2lY7B9vJMdxIJ/si0hgzoc PIwQxVJM4D47NWEdKFSGeUs4nFanG6XhBNuMhee0EUXq0aTTgTwmAjQKJjy8TN2w5K 2to80GbftU4MH8SV8W9C29w/KxR4tZBddqsodCubHNw3WoRrOZTJY8yykMxiGbz/wy UuGNdxLHqXm9leUyZHWxgtgAaqxw9Lymofix+ywRRKcgD8+1JnaefWWwM/SlIUSt26 ydhS5cIgXzmzmmjWff5GryWyBbzZvQrRjtuOh2PKHT3y0xZD3LJzYn8wmUtqOEMURA ZZBxPKfox5aUA== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 69B36120995; Fri, 3 Jul 2020 09:39:17 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <43ce844e-b239-0c39-ad4f-86fec376f945@cs.ucla.edu> <2CEB4A36-3DDF-4868-B8E0-B6AC35C1DFAF@acm.org> Date: Fri, 03 Jul 2020 09:39:10 -0400 In-Reply-To: <2CEB4A36-3DDF-4868-B8E0-B6AC35C1DFAF@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Fri, 3 Jul 2020 11:32:35 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.037 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Hash-consing bignums may be a good idea (I'm neutral on the idea), but there > could be a reason why it isn't very commonly seen in other runtimes; perhaps > they have more efficient GCs (generational and/or incremental), but Emacs > would benefit (a lot) from that, too. I don't think the GC performance has very much to do with it. I think it's simply that hash-consing bignums has a negative effect on the performance of bignum operations (by a constant factor which I guesstimate to be around 50%). For a general purpose language this can be significant. In my opinion for Emacs Lisp this is irrelevant (we've lived without real bignums (using slow emulations instead) for more than 30 years, so even half-speed bignums are much better than what we really need). It could become relevant if/when we replace wide-int with bignums, in which case performance of "small bignums" could be fairly important. But I'm not sure if we'll ever want to replace wide-ints with bignums (tho I do hope we will). > In any case, it's a one-way decision: once we guarantee eq to provide > numerical equality (whether by hash-consing or otherwise), there is no > way back. Yes, once you've had the taste of clean semantics it's hard to go back ;-) Stefan "in favor of redefining `eq` to `eql`" From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 18:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159380108918761 (code B ref 42147); Fri, 03 Jul 2020 18:32:01 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 18:31:29 +0000 Received: from localhost ([127.0.0.1]:57660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrQTB-0004sX-Bs for submit@debbugs.gnu.org; Fri, 03 Jul 2020 14:31:29 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrQT9-0004sK-BN for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 14:31:28 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 434FA1600E1; Fri, 3 Jul 2020 11:31:21 -0700 (PDT) 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 hknsKjfEP5DJ; Fri, 3 Jul 2020 11:31:20 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8E2821600EA; Fri, 3 Jul 2020 11:31:20 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 PR80P6Eesh8R; Fri, 3 Jul 2020 11:31:20 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 574481600E1; Fri, 3 Jul 2020 11:31:20 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcU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MStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: Date: Fri, 3 Jul 2020 11:31:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/3/20 1:32 AM, Mattias Engdeg=C3=A5rd wrote: > In practice, the extra precision of x87 code is so unreliable and fickl= e (unless the 80-bit long double is used throughout) that it's almost nev= er worth it. Depends on whether you want reproducibility or accuracy. We prefer the fo= rmer, it seems. > Fortunately modern compilers generate SSE code by default No, GCC generates x87 code by default. You need to specify -mfpmath=3Dsse= to convince it to not generate x87 code. (Or, when you build GCC, you need t= o pass --with-mfpmath=3Dsse to 'configure'; but I think this is uncommon, at lea= st in the GNU/Linux world.) Having Emacs use --with-mfpmath=3Dsse should improve performance a bit on= x86. But more important, it should make floating point more reproducible. If I get= the time I'll look into having 'configure' add it automatically. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159380135719173 (code B ref 42147); Fri, 03 Jul 2020 18:36:02 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 18:35:57 +0000 Received: from localhost ([127.0.0.1]:57668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrQXU-0004zA-U4 for submit@debbugs.gnu.org; Fri, 03 Jul 2020 14:35:57 -0400 Received: from mail1451c50.megamailservers.eu ([91.136.14.51]:56962 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrQXS-0004yl-2a for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 14:35:55 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593801339; bh=JsrY+6moARlLqfWCU/g7vv3f/2I2a8sbitAhxsw9WDw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=KkcIhY4/NKXPw/kqP5Aq/GgeNaPN3LAY0NECy12f0AxoHhW1CFjpCWkDCH/BoKHg7 y5N5myixGVsJHw/aw4mFkOs5DKMssKxfHzNxn7RAuRnqwtIZZZJMVqG4ELHqP4bJoD skSKlH5kXKzuUjHraQnYg6MvBPTOAsSNI8sdnUbw= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 063IZZB6027054; Fri, 3 Jul 2020 18:35:37 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Fri, 3 Jul 2020 20:35:34 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F24.5EFF79F6.001F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=A5MSwJeG c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=3eXLOUZK9UX6dtRRiNQA:9 a=CjuIK1q_8ugA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 3 juli 2020 kl. 15.11 skrev Stefan Monnier : > >> Fortunately modern compilers generate SSE code by default, only passing >> return values on the x87 stack as per the x86 ABI [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 3 juli 2020 kl. 15.11 skrev Stefan Monnier : >=20 >> Fortunately modern compilers generate SSE code by default, only = passing >> return values on the x87 stack as per the x86 ABI (which causes no >> harm). This reduces an already tiny risk to nil. We could add an = elaborate >> configure or run-time test and admonishments to the installation >> instructions but frankly we have better use of our time. I suggest we >> replace byte-opt--portable-numberp with numberp (or nothing at all, >> depending on where it occurs) and be done with it. >=20 > Agreed, Thanks -- patch attached. Some expressions will still not be = constant-folded entirely; for example (byte-optimize-form '(+ #x100000000000000 1 1)) =3D> (+ 72057594037927936 1 1) This will be fixed automatically by marking + as pure; the same should = be done for the other arithmetic functions. By the way, is it a bug or a feature that calls to pure functions with = constant but invalid arguments raise an error at compile-time? For = example: (disassemble (lambda () (if nil (regexp-quote nil)))) will raise an error despite none would be generated at run time if this = function were interpreted. It's easy to suppress those errors, but I see how they can be useful in = practice. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 18:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159380185919921 (code B ref 42147); Fri, 03 Jul 2020 18:45:02 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 18:44:19 +0000 Received: from localhost ([127.0.0.1]:57676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrQfb-0005BD-2Z for submit@debbugs.gnu.org; Fri, 03 Jul 2020 14:44:19 -0400 Received: from mail1446c50.megamailservers.eu ([91.136.14.46]:54572 helo=mail265c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrQfY-0005B0-T0 for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 14:44:18 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593801841; bh=evUNqf3P8pNSTzSVBlRjW4SDdThjNUGAGBSkPZWYqbU=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=aAqLg/AVjnMXua0P6dwfxy9J/+JJCrlQf1bTRXFmIO46HRvv3XCMHv2xDv1oP/Q1B Sh1uqS2iQLC+jnQixia+1glFePqgRMoR+qM/6ogsdb2ugkcDhJIbNx0UxpH98h1vXd s2PwFzTcMD/h85vkMHJmi00iaWHnxSIXJuEEnTOw= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 063Ihwca005275; Fri, 3 Jul 2020 18:44:00 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_64FDEC5C-5CFF-4A2D-903C-FA5EBC80B4A0" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Date: Fri, 3 Jul 2020 20:43:57 +0200 In-Reply-To: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F22.5EFF7BC4.0070, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=D5w51cZj c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=4K3v4Wtmzs6zsS628y4A:9 a=CjuIK1q_8ugA:10 a=AOTq0esIhStyUFMtzskA:9 a=B2y7HmGcmWMA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > patch attached Now. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_64FDEC5C-5CFF-4A2D-903C-FA5EBC80B4A0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > patch attached Now. --Apple-Mail=_64FDEC5C-5CFF-4A2D-903C-FA5EBC80B4A0 Content-Disposition: attachment; filename=0001-Relax-portable-number-check-in-byte-compiler-bug-421.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Relax-portable-number-check-in-byte-compiler-bug-421.patch" Content-Transfer-Encoding: quoted-printable =46rom=207b0a5329706a6c73e49b5e3b464543f8ba94f21d=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=203=20Jul=202020=2020:13:50=20+0200=0A= Subject:=20[PATCH]=20Relax=20portable=20number=20check=20in=20byte=20= compiler=20(bug#42147)=0A=0AWith=20bignums,=20the=20set=20of=20= representable=20integers=20is=20no=20longer=0Aplatform-dependent,=20and=20= since=20we=20use=20nothing=20but=20IEEE754=2064-bit=0Afloats,=20all=20= numbers=20are=20now=20portable.=20=20Take=20advantage=20of=20this=20fact=0A= to=20simplify=20constant-folding=20in=20the=20byte=20compiler,=20= allowing=20it=20to=0Abe=20applied=20more=20widely.=0A=0A*=20= lisp/emacs-lisp/byte-opt.el=20(byte-opt--portable-max)=0A= (byte-opt--portable-min,=20byte-opt--portable-numberp):=20Remove.=0A= (byte-opt--arith-reduce,=20byte-optimize-minus,=20byte-optimize-1+)=0A= (byte-optimize-1-):=20Simplify:=20any=20number=20will=20do,=20and=20if=20= N=20is=20a=0Anumber,=20then=20so=20are=20-N,=20N+1=20and=20N-1.=0A---=0A=20= lisp/emacs-lisp/byte-opt.el=20|=2039=20= +++++++++----------------------------=0A=201=20file=20changed,=209=20= insertions(+),=2030=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/byte-opt.el=20b/lisp/emacs-lisp/byte-opt.el=0Aindex=20= 12bde8faf3..bf9e6a728a=20100644=0A---=20a/lisp/emacs-lisp/byte-opt.el=0A= +++=20b/lisp/emacs-lisp/byte-opt.el=0A@@=20-672,36=20+672,18=20@@=20= byte-optimize-associative-math=0A=20=09=20=20=20=20(apply=20(car=20form)=20= constants))=0A=20=09form)))=0A=20=0A-;;=20Portable=20Emacs=20integers=20= fall=20in=20this=20range.=0A-(defconst=20byte-opt--portable-max=20= #x1fffffff)=0A-(defconst=20byte-opt--portable-min=20(-=20-1=20= byte-opt--portable-max))=0A-=0A-;;=20True=20if=20N=20is=20a=20number=20= that=20works=20the=20same=20on=20all=20Emacs=20platforms.=0A-;;=20= Portable=20Emacs=20fixnums=20are=20exactly=20representable=20as=20floats=20= on=20all=0A-;;=20Emacs=20platforms,=20and=20(except=20for=20-0.0)=20any=20= floating-point=20number=0A-;;=20that=20equals=20one=20of=20these=20= integers=20must=20be=20the=20same=20on=20all=0A-;;=20platforms.=20=20= Although=20other=20floating-point=20numbers=20such=20as=200.5=20are=0A= -;;=20also=20portable,=20it=20can=20be=20tricky=20to=20characterize=20= them=20portably=20so=0A-;;=20they=20are=20not=20optimized.=0A-(defun=20= byte-opt--portable-numberp=20(n)=0A-=20=20(and=20(numberp=20n)=0A-=20=20=20= =20=20=20=20(<=3D=20byte-opt--portable-min=20n=20byte-opt--portable-max)=0A= -=20=20=20=20=20=20=20(=3D=20n=20(floor=20n))=0A-=20=20=20=20=20=20=20= (not=20(and=20(floatp=20n)=20(zerop=20n)=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(condition-case=20()=20(<=20(/=20n)=200)=20= (error))))))=0A-=0A-;;=20Use=20OP=20to=20reduce=20any=20leading=20prefix=20= of=20portable=20numbers=20in=20the=20list=0A-;;=20(cons=20ACCUM=20ARGS)=20= down=20to=20a=20single=20portable=20number,=20and=20return=20the=0A+;;=20= Use=20OP=20to=20reduce=20any=20leading=20prefix=20of=20constant=20= numbers=20in=20the=20list=0A+;;=20(cons=20ACCUM=20ARGS)=20down=20to=20a=20= single=20number,=20and=20return=20the=0A=20;;=20resulting=20list=20A=20= of=20arguments.=20=20The=20idea=20is=20that=20applying=20OP=20to=20A=0A=20= ;;=20is=20equivalent=20to=20(but=20likely=20more=20efficient=20than)=20= applying=20OP=20to=0A=20;;=20(cons=20ACCUM=20ARGS),=20on=20any=20Emacs=20= platform.=20=20Do=20not=20make=20any=20special=0A=20;;=20provision=20for=20= (-=20X)=20or=20(/=20X);=20for=20example,=20it=20is=20the=20caller=E2=80=99= s=0A=20;;=20responsibility=20that=20(-=201=200)=20should=20not=20be=20= "optimized"=20to=20(-=201).=0A=20(defun=20byte-opt--arith-reduce=20(op=20= accum=20args)=0A-=20=20(when=20(byte-opt--portable-numberp=20accum)=0A+=20= =20(when=20(numberp=20accum)=0A=20=20=20=20=20(let=20(accum1)=0A-=20=20=20= =20=20=20(while=20(and=20(byte-opt--portable-numberp=20(car=20args))=0A-=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (byte-opt--portable-numberp=0A+=20=20=20=20=20=20(while=20(and=20= (numberp=20(car=20args))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(numberp=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(setq=20accum1=20(condition-case=20()=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(funcall=20op=20accum=20(car=20args))=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(error))))=0A@@=20-746,12=20+728,11=20@@=20byte-optimize-minus=0A=20= =20=20=20=20=20=20=20;;=20(-=20x=20-1)=20-->=20(1+=20x)=0A=20=20=20=20=20= =20=20=20((equal=20(cdr=20args)=20'(-1))=0A=20=20=20=20=20=20=20=20=20= (list=20'1+=20(car=20args)))=0A-=20=20=20=20=20=20=20;;=20(-=20n)=20->=20= -n,=20where=20n=20and=20-n=20are=20portable=20numbers.=0A+=20=20=20=20=20= =20=20;;=20(-=20n)=20->=20-n,=20where=20n=20and=20-n=20are=20constant=20= numbers.=0A=20=20=20=20=20=20=20=20;;=20This=20must=20be=20done=20= separately=20since=20byte-opt--arith-reduce=0A=20=20=20=20=20=20=20=20;;=20= is=20not=20applied=20to=20(-=20n).=0A=20=20=20=20=20=20=20=20((and=20= (null=20(cdr=20args))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= (byte-opt--portable-numberp=20(car=20args))=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20(byte-opt--portable-numberp=20(-=20(car=20args))))=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20(numberp=20(car=20args)))=0A=20=20=20=20=20= =20=20=20=20(-=20(car=20args)))=0A=20=20=20=20=20=20=20=20;;=20not=20= further=20optimized=0A=20=20=20=20=20=20=20=20((equal=20args=20(cdr=20= form))=20form)=0A@@=20-761,8=20+742,7=20@@=20byte-optimize-1+=0A=20=20=20= (let=20((args=20(cdr=20form)))=0A=20=20=20=20=20(when=20(null=20(cdr=20= args))=0A=20=20=20=20=20=20=20(let=20((n=20(car=20args)))=0A-=20=20=20=20= =20=20=20=20(when=20(and=20(byte-opt--portable-numberp=20n)=0A-=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(byte-opt--portable-numberp=20= (1+=20n)))=0A+=20=20=20=20=20=20=20=20(when=20(numberp=20n)=0A=20=20=20=20= =20=20=20=20=20=20=20(setq=20form=20(1+=20n))))))=0A=20=20=20form)=0A=20=0A= @@=20-770,8=20+750,7=20@@=20byte-optimize-1-=0A=20=20=20(let=20((args=20= (cdr=20form)))=0A=20=20=20=20=20(when=20(null=20(cdr=20args))=0A=20=20=20= =20=20=20=20(let=20((n=20(car=20args)))=0A-=20=20=20=20=20=20=20=20(when=20= (and=20(byte-opt--portable-numberp=20n)=0A-=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(byte-opt--portable-numberp=20(1-=20n)))=0A+=20= =20=20=20=20=20=20=20(when=20(numberp=20n)=0A=20=20=20=20=20=20=20=20=20=20= =20(setq=20form=20(1-=20n))))))=0A=20=20=20form)=0A=20=0A--=20=0A2.21.1=20= (Apple=20Git-122.3)=0A=0A= --Apple-Mail=_64FDEC5C-5CFF-4A2D-903C-FA5EBC80B4A0-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 18:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159380206720271 (code B ref 42147); Fri, 03 Jul 2020 18:48:01 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 18:47:47 +0000 Received: from localhost ([127.0.0.1]:57680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrQiw-0005Gt-MC for submit@debbugs.gnu.org; Fri, 03 Jul 2020 14:47:46 -0400 Received: from mail210c50.megamailservers.eu ([91.136.10.220]:50592 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrQiu-0005Gk-Ns for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 14:47:45 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593802055; bh=ScbJjQUYpFI3GYIO/rjZAFxove4wjqgNdnun7hW+jT8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=SzoqTrt3TasWZ3cuI7kweQuaUOOjJxYv1v0OqIKO8uWr7BwSvmFwRLCyGNo7HFXMl WLOEK5CS1wddM/RSj1Z8gxadm4Gt3nFnQM9oho9QctyG/+56AI4iAwzc8JEQzOw5eB 548OTfXWzI0bpVEqZdZgBjUMLk3fsuTS9+ELhXOQ= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 063Il9hB005071; Fri, 3 Jul 2020 18:47:12 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Fri, 3 Jul 2020 20:47:08 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F17.5EFF7D47.0026, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KsozJleN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=54PqhIg7O_V8ir1E6DYA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 3 juli 2020 kl. 20.31 skrev Paul Eggert : > No, GCC generates x87 code by default. Sorry, my mistake -- I was testing various compiler options with godbolt = and must have looked at LLVM instead. > Having Emacs use --with-mfpmath=3Dsse should improve performance a bit = on x86. But > more important, it should make floating point more reproducible. If I = get the > time I'll look into having 'configure' add it automatically. Thank you, this would be a prerequisite for further improvements. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jul 2020 19:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159380315121978 (code B ref 42147); Fri, 03 Jul 2020 19:06:02 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Jul 2020 19:05:51 +0000 Received: from localhost ([127.0.0.1]:57688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrR0R-0005iQ-9y for submit@debbugs.gnu.org; Fri, 03 Jul 2020 15:05:51 -0400 Received: from sonic304-23.consmr.mail.ir2.yahoo.com ([77.238.179.148]:39042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrR0O-0005i5-6b for 42147@debbugs.gnu.org; Fri, 03 Jul 2020 15:05:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593803141; bh=nCH/zPad0klm1kCjv9d9pAKgKNHI8i9NL4u27fqcUCQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=rXWTBoIMuw+/LSGRrbr/TUgylcUlkO3fXr/n5tocafjb0JO1zUlx087F02JFZROrzpyd2b+jC5bELCmlkFoWTSjhNRnw7zSyli8A0PPrz1mHBl5OD2pGscOmrVWs+JpLuzRTwwjOuSsrVZZn2kGlzEJrK7klahqhXXQWlOl95pR9wOvvfaJ0eXUC7UnvgLeRBmDTw1O+JfCrJA5n/L55V3xWlf9OIzya/TyGwhYUz948efB5BzcmE+WrfxkrKT+xNDgkx316qvfQE+uDVG35mL9kH4WoIJ/3DvDpAJm8drxuqVZDEyC9iSuZkDsEeOYcgrtPxAzCXZgwnFptVMUT4Q== X-YMail-OSG: AyUtZvQVM1lnSQV600VnMdA7cf_7ZNyqhqZ2H0j54SS_bya2_LJDluzZYfCdaqj Ifz5NpOMQKejxair_9g2xougG1VCsZHf34Yv9qRpdE6VlCQW47EVSLKr6wl115AXIiWgpt6lH_CW .pwdKT138Z_tExl3SdHUwHaJcZUabOSPiLCVM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ChDq3d6v.5vdK8B3cGxc 0Hi8sEF4R150JKYCTUDVIUqMgPs0HWVhkK3pyWdRlK8rH1QRaBG200uIw6C7J3efwre5aCWBnktb JD68qBuw0CW98hJm8c4DYQmP3l0dUg.zzRSd1TiSH Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Fri, 3 Jul 2020 19:05:41 +0000 Date: Fri, 3 Jul 2020 19:05:40 +0000 (UTC) From: Andrea Corallo Message-ID: <1374652931.3977142.1593803140551@mail.yahoo.com> In-Reply-To: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3977141_1588705637.1593803140550" X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 3264 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ------=_Part_3977141_1588705637.1593803140550 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mattias Engdeg=C3=A5rd writes: > This will be fixed automatically by marking + as pure; the same should be= done for the other arithmetic functions. Hi, attached the updated version of the patch updating the pure function classification. Please have a look. Thanks =C2=A0 Andrea ------=_Part_3977141_1588705637.1593803140550 Content-Type: text/x-patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Add-a-number-of-functions-to-pure-fns-bug-42147.patch" Content-ID: <91e29c1e-aa18-bc92-394f-1c25d52f825d@yahoo.com> RnJvbSBmNmI3Nzk0ZWY3MmE3ODhlY2I5ZTY3MzFiMTBmYTg0OTU1OWYyMGEyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmRyZWEgQ29yYWxsbyA8YWtybEBzZGYub3JnPgpEYXRlOiBX ZWQsIDEgSnVsIDIwMjAgMTA6MDc6NTcgKzAyMDAKU3ViamVjdDogW1BBVENIXSAqIEFkZCBhIG51 bWJlciBvZiBmdW5jdGlvbnMgdG8gcHVyZS1mbnMgKGJ1ZyM0MjE0NykKCgkqIGxpc3AvZW1hY3Mt bGlzcC9ieXRlLW9wdC5lbCAocHVyZS1mbnMpOiBBZGQ6IC89LCA8LCA8PSwgPSwKCT4sID49LCBh YnMsIGFycmF5cCwgYXNoLCBhc3NvYywgYXNzcSwgYm9vbC12ZWN0b3ItcAoJY2hhci1vci1zdHJp bmctcCwgY2hhcmFjdGVycCwgY29uc3AsIGVxLCBlcWwsIGVxdWFsLCBleHB0LAoJZmxvYXRwLCBo YXNoLXRhYmxlLXAsIGlkZW50aXR5LCBpbnRlZ2VyLW9yLW1hcmtlci1wLCBpbnRlZ2VycCwKCWtl eXdvcmRwLCBsZW5ndGgsIGxpc3RwLCBtZW1iZXIsIG1lbXEsIG1lbXFsLCBtb2QsIG5hdG51bXAs CglubGlzdHAsIG5vdCwgbnVsbCwgbnVtYmVyLW9yLW1hcmtlci1wLCBudW1iZXJwLCBwcm9wZXIt bGlzdC1wLAoJcmFzc3EsIHNhZmUtbGVuZ3RoLCBzZXF1ZW5jZXAsIHN0cmluZy1lcXVhbCwgc3Ry aW5nLWxlc3NwLAoJc3RyaW5nPCwgc3RyaW5nPSwgc3RyaW5ncCwgc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VtcWwgbW9kCisg ICAgICAgICBuYXRudW1wIG5saXN0cCBub3QgbnVsbCBudW1iZXItb3ItbWFya2VyLXAsIG51bWJl cnAgcHJvcGVyLWxpc3QtcAorICAgICAgICAgcmFzc3EgcmVnZXhwLW9wdCByZWdleHAtcXVvdGUg c2FmZS1sZW5ndGggc2VxdWVuY2VwIHN0cmluZy1lcXVhbAorICAgICAgICAgc3RyaW5nLWxlc3Nw IHN0cmluZy10by1jaGFyIHN0cmluZy10by1zeW50YXggc3RyaW5nPCBzdHJpbmc9IHN0cmluZ3AK KyAgICAgICAgIHN5bWJvbC1uYW1lIHN5bWJvbHAgdmVjdG9ycCkpKQogICAod2hpbGUgcHVyZS1m bnMKICAgICAocHV0IChjYXIgcHVyZS1mbnMpICdwdXJlIHQpCiAgICAgKHNldHEgcHVyZS1mbnMg KGNkciBwdXJlLWZucykpKQotLSAKMi4xNy4xCgo= ------=_Part_3977141_1588705637.1593803140550-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 14:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo , Philipp Stephani Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159387471321209 (code B ref 42147); Sat, 04 Jul 2020 14:59:02 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 14:58:33 +0000 Received: from localhost ([127.0.0.1]:59376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrjcf-0005W1-AQ for submit@debbugs.gnu.org; Sat, 04 Jul 2020 10:58:33 -0400 Received: from mail200c50.megamailservers.eu ([91.136.10.210]:39408 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrjcc-0005Vq-4W for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 10:58:32 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593874698; bh=c6u82rFySUawC1S2o0vkyhBe0yoUeFjiLHeiFmUbDfk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=qsNMpVYbBUhWecpUqvFzSgWc7N1bXalB6WWTjPeAZ3DGecSq5avDuBD0e/lDNOVb0 Y9VILMx700xrOBtvMWgYltHVYsgZRX9DaMiIipWS5YpRVXUdJe7iH9lHWWwb7dKEZE nOufO8bdA/qgIHwm4yI1glFaniUf0j4GbahN78ZQ= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 064EwE4g024063; Sat, 4 Jul 2020 14:58:15 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <1374652931.3977142.1593803140551@mail.yahoo.com> Date: Sat, 4 Jul 2020 16:58:13 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1374652931.3977142.1593803140551@mail.yahoo.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F19.5F00990A.0037, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=cM2eTWWN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mQlE-r5yVJJReojE4i0A:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 3 juli 2020 kl. 21.05 skrev Andrea Corallo : > attached the updated version of the patch updating the pure function > classification. Thanks Andrea! Philipp Stephani raised the interesting question of = (essentially) whether 'car' is pure. For the purposes of the current = constant folding in the byte compiler the answer is yes, but perhaps you = have wider ambitions in your work? Clearly, (car X) cannot be moved past some operations with side-effects = if X is aliased: (let* ((x (list 'a)) (y (car x))) (f x) y) Here, (car x) cannot be sunk past the call to f despite x remaining = unchanged (assuming lexical binding). It would be useful to know more exactly what notion of purity you = require. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 15:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159387521522073 (code B ref 42147); Sat, 04 Jul 2020 15:07:01 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 15:06:55 +0000 Received: from localhost ([127.0.0.1]:59390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrjkl-0005jx-4p for submit@debbugs.gnu.org; Sat, 04 Jul 2020 11:06:55 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:45161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrjkh-0005jh-U3 for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 11:06:53 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 74F61440FCD; Sat, 4 Jul 2020 11:06:46 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 158B0440FBC; Sat, 4 Jul 2020 11:06:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593875205; bh=wXxB0l1EikNwC9klgdnL1uNqat/o/uPqO4qKWv+fxko=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YaYPu15cUTiTi++vhVsgdzMQ3z1MfkMAXyiL0Ou7Cx88QBWU0bCrxvFPMrk+js8VB Bttm5xHD8BjsWB7PWKzai4EVbhP/ny2Su6A92W5rvpIphyJzbdldeM0PkiqyD5NGel qZvegvyN9ET/k3E/XhdQ25KCkpXRc3v57bEg3XkSF5htrWuR3PRxWhh8PfoGAqH4Fy b+VdKygTH2LJkWV2ir7aGdYZlUoq4fkSscPT7Puc7vIjhkrFSBxLR8KzObHFiVyQSz UmFZnWa1kp6to1j8endILEZLV5y9u27lmvWMjbXQmcobjUc4BoBHPjG1e8vMoR4gM7 SdoHff6FvmDkA== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8F66A12040A; Sat, 4 Jul 2020 11:06:44 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> Date: Sat, 04 Jul 2020 11:06:38 -0400 In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Fri, 3 Jul 2020 20:35:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.039 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Thanks -- patch attached. Some expressions will still not be constant-folded > entirely; for example LGTM, Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 15:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159387824526998 (code B ref 42147); Sat, 04 Jul 2020 15:58:02 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 15:57:25 +0000 Received: from localhost ([127.0.0.1]:59425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrkXb-00071G-Qx for submit@debbugs.gnu.org; Sat, 04 Jul 2020 11:57:25 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrkXW-00070u-Kd for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 11:57:23 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 916121600EB; Sat, 4 Jul 2020 08:57:12 -0700 (PDT) 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 AgwuUstwyPlT; Sat, 4 Jul 2020 08:57:08 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 989461600F1; Sat, 4 Jul 2020 08:57:08 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 P83Ap5F1zHvR; Sat, 4 Jul 2020 08:57:08 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4DC771600EB; Sat, 4 Jul 2020 08:57:08 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQc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ZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> Date: Sat, 4 Jul 2020 08:57:08 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> Content-Type: multipart/mixed; boundary="------------C604600103C626970557F6D0" Content-Language: en-US X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a multi-part message in MIME format. --------------C604600103C626970557F6D0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 7/3/20 11:47 AM, Mattias Engdeg=C3=A5rd wrote: >> Having Emacs use --with-mfpmath=3Dsse should improve performance a bit= on x86. But >> more important, it should make floating point more reproducible. If I = get the >> time I'll look into having 'configure' add it automatically. > Thank you, this would be a prerequisite for further improvements. Attached is a patch to do that. I looked at the GCC source code, and x86 = is the only platform where this sort of thing should be necessary. I'll mention = this patch on emacs-devel, to give people a heads-up before installing. --------------C604600103C626970557F6D0 Content-Type: text/x-patch; charset=UTF-8; name="0001-Prefer-standard-rounding-on-x86.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Prefer-standard-rounding-on-x86.patch" >From df1cd25cefbbbd908efef3023598a6c72d34a176 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 4 Jul 2020 08:43:12 -0700 Subject: [PATCH] Prefer standard rounding on x86 This makes Emacs behavior more consistent across platforms, and should make some byte-code optimizations safer (Bug#42147). We can assume SSE2 by now, since it has been out for 20 years. * configure.ac: On x86 with GCC, default to -msse2 -mfpmath=sse. * etc/NEWS: Mention this. --- configure.ac | 11 +++++++++++ etc/NEWS | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/configure.ac b/configure.ac index 6ede6104d3..9af691078f 100644 --- a/configure.ac +++ b/configure.ac @@ -943,6 +943,17 @@ AC_DEFUN esac fi +# Unless configured otherwise, prefer standard rounding on x86 if available. +# This makes x86 floating-point more consistent with other platforms. +# To build for older x86 processors not supporting SSE2 (introduced in +# 2000), invoke 'configure' with -mno-sse2 in CFLAGS. +case "$host_cpu, $CC $CFLAGS " in + *' -mfpmath='* | *' -mno-sse2 '*) ;; + i?86,* | x86_64,*' -m32 '*) + gl_COMPILER_OPTION_IF([-msse2 -mfpmath=sse], + [CFLAGS="$CFLAGS -msse2 -mfpmath=sse"]);; +esac + # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) # --------------------------------------------------------------------------- # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND. diff --git a/etc/NEWS b/etc/NEWS index fc5c215d2a..090ebd6312 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -58,6 +58,12 @@ shaping, so 'configure' now recommends that combination. ** The ftx font backend driver has been removed. It was declared obsolete in Emacs 27.1. +--- +** On x86 with GCC-like compilers, Emac builds now assume SSE2 by default. +This makes x86 floating-point more consistent with other platforms. +To build for older x86 processors not supporting SSE2 (introduced in +2000), invoke 'configure' with -mno-sse2 in CFLAGS. + --- ** Emacs no longer supports old OpenBSD systems. OpenBSD 5.3 and older releases are no longer supported, as they lack -- 2.25.4 --------------C604600103C626970557F6D0-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 16:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier Cc: Paul Eggert , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159387924228711 (code B ref 42147); Sat, 04 Jul 2020 16:15:02 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 16:14:02 +0000 Received: from localhost ([127.0.0.1]:59447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrkni-0007T1-7x for submit@debbugs.gnu.org; Sat, 04 Jul 2020 12:14:02 -0400 Received: from sonic302-20.consmr.mail.ir2.yahoo.com ([87.248.110.83]:34488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrkng-0007SO-0Q for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 12:14:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yah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pARrN95bdJgEmao97fbOQFrRTdMiufHV6A.2G9Lc7S_slV8ve75IaBNOR_SMq8xjY63edVsl UAdjdrxU27k.wJjJM8YyKvT.8iCH23px4mxPKdzUE40ZmEfWpErq1bPgW6XirkpN5vkxhEBkUCuJ GWdfVqzHLqbOflSbKxeZadME_RetC0tQrt9nC9vWgJ019tQ8FAVdo8UYNN2InT2.rIevGYxLvNeE K673I.ElnTJYsQJ6NNtcsEMqtLT4mTTyGRQV9o9ilZD3nJJ3cB8TV7lNHrDnfBYPC3B37HDJqFZZ HyWM78OKuMGGnmjjZHIx_yD0WInErOi3yT3iM0ckqiZXn3HkD9ewq1XnIGniJ53M77_ZTwG7BHWh XBeP35.OUSsQlXR1Q3IHwFz1bQGtXNMzxQmnHa5Q.vvCRDJM4VYmKYLICrGRMkP.PY9XnRzQ_Sx. AKHsYurRbPphjJVWbNmmRES5jktAtfF1WM_xyOT9EVklGhh.bE3ZO9b6BfUs76jPoUK432cb_lcN qSFxzeO_hCEgvC2kD37VU7GgIjAvEd185htTvOghzJcfR8K5BtBcomt7j7ghnKtA_G7uTVwkLkoP 6AmJwoSoDHwNc0LpELjWiYP0xxV64NmesWtB.Tt1VousB4_CFbYn37WXsuinGAbNhR_OFukJef7O XiP7tzCBtR2vhicmwmtK_yft_GXjntYe639hDGZwQBVAp0IG0uyOBCljE147bbAJbspYwgKgLXDT 94B_PQx2ud5G4mBcWP5G7QxHXDNDuiOoMN_6s5w-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ir2.yahoo.com with HTTP; Sat, 4 Jul 2020 16:13:51 +0000 Date: Sat, 4 Jul 2020 16:13:48 +0000 (UTC) From: Andrea Corallo Message-ID: <1690361185.4397117.1593879228865@mail.yahoo.com> In-Reply-To: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4397116_2096925800.1593879228865" X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 5735 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) ------=_Part_4397116_2096925800.1593879228865 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mattias Engdeg=C3=A5rd writes: > 3 juli 2020 kl. 21.05 skrev Andrea Corallo : > >> attached the updated version of the patch updating the pure function >> classification. > > Thanks Andrea! Philipp Stephani raised the interesting question of (essen= tially) whether 'car' is pure. For the purposes of the current constant fol= ding in the byte compiler the answer is yes, but perhaps you have wider amb= itions in your work? > > Clearly, (car X) cannot be moved past some operations with side-effects i= f X is aliased: > > (let* ((x (list 'a)) >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (y (car x))) >=C2=A0=C2=A0 (f x) >=C2=A0=C2=A0 y) > > Here, (car x) cannot be sunk past the call to f despite x remaining uncha= nged (assuming lexical binding). > It would be useful to know more exactly what notion of purity you require= . Thanks for the observation, today I was studying the situation. I think the notion of purity has to be the same one we use in the byte compiler.=C2=A0 The trickiness is in if the considered object is immutable = or not.=C2=A0 The optimizer must stay in the boundary of what is allowed in th= is regard. To put in elisp what I think ATM: (defun aaa () =C2=A0 (let ((x (list 1 2))) =C2=A0=C2=A0=C2=A0 (1+ (car x)) ; <=3D legally optimizable =C2=A0=C2=A0=C2=A0 )) (defun bbb () =C2=A0 (let ((x (list 1 2))) =C2=A0=C2=A0=C2=A0 (f x)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ; f is n= ot pure =C2=A0=C2=A0=C2=A0 (1+ (car x)) ; <=3D cannot optimize =C2=A0=C2=A0=C2=A0 )) (defun ccc () =C2=A0 (let ((x '(1 2))) =C2=A0=C2=A0=C2=A0 (f x)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ; f is n= ot pure =C2=A0=C2=A0=C2=A0 (1+ (car x)) ; <=3D legally optimizable because immutabl= e =C2=A0=C2=A0=C2=A0 )) (defun ddd () =C2=A0 (let ((x (list 1 2))) =C2=A0=C2=A0=C2=A0 (f x)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ; f is p= ure =C2=A0=C2=A0=C2=A0 (1+ (car x)) ; <=3D legally optimizable =C2=A0=C2=A0=C2=A0 )) Now given we are not constant folding `cons' we are not materializing conses, as a consequence of these three example we would optimize only `ccc' if we include `car' as pure.=C2=A0 AFAIU this is correct given modifying an immutable object in `f' would be undefined. So yes for me `car' is pure and I think we should add it to the list. BTW reading the code of the native compiler I realized I am already extrapolating for use a very similar list of optimizable functions to the o= ne proposed.=C2=A0 I still think would quite cleaner to classify these in byte-opt.el. Attached the updated patch where I'm adding car, car-safe, cdr, cdr-safe, max, min. Feedback welcome Thanks =C2=A0 Andrea ------=_Part_4397116_2096925800.1593879228865 Content-Type: text/x-patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Add-a-number-of-functions-to-pure-fns-bug-42147.patch" Content-ID: <227aaa37-7b0f-c793-8ef4-92bce9e1b6fc@yahoo.com> RnJvbSAxNWE3ZGM5MWEzZWYyNzhlMWJlYWE4MzRmZGY5NjE4NDRmN2I4MGM4IE1v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gcmVnZXhw LW9wdCByZWdleHAtcXVvdGUgc2FmZS1sZW5ndGggc2VxdWVuY2VwCisgICAgICAgICBzdHJpbmct ZXF1YWwgc3RyaW5nLWxlc3NwIHN0cmluZy10by1jaGFyIHN0cmluZy10by1zeW50YXggc3RyaW5n PAorICAgICAgICAgc3RyaW5nPSBzdHJpbmdwIHN5bWJvbC1uYW1lIHN5bWJvbHAgdmVjdG9ycCkp KQogICAod2hpbGUgcHVyZS1mbnMKICAgICAocHV0IChjYXIgcHVyZS1mbnMpICdwdXJlIHQpCiAg ICAgKHNldHEgcHVyZS1mbnMgKGNkciBwdXJlLWZucykpKQotLSAKMi4xNy4xCgo= ------=_Part_4397116_2096925800.1593879228865-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 16:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: mattiase@acm.org, monnier@iro.umontreal.ca, andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159387935628898 (code B ref 42147); Sat, 04 Jul 2020 16:16:02 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 16:15:56 +0000 Received: from localhost ([127.0.0.1]:59451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrkpX-0007W2-SZ for submit@debbugs.gnu.org; Sat, 04 Jul 2020 12:15:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrkpW-0007Vn-4g for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 12:15:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36628) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkpP-0007ae-JE; Sat, 04 Jul 2020 12:15:47 -0400 Received: from [176.228.60.248] (port=2419 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jrkpM-00032p-Vh; Sat, 04 Jul 2020 12:15:47 -0400 Date: Sat, 04 Jul 2020 19:15:48 +0300 Message-Id: <83zh8ftfwr.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> (message from Paul Eggert on Sat, 4 Jul 2020 08:57:08 -0700) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Paul Eggert > Date: Sat, 4 Jul 2020 08:57:08 -0700 > Cc: Stefan Monnier , > Andrea Corallo , 42147@debbugs.gnu.org > > This makes Emacs behavior more consistent across platforms, > and should make some byte-code optimizations safer (Bug#42147). > We can assume SSE2 by now, since it has been out for 20 years. > * configure.ac: On x86 with GCC, default to -msse2 -mfpmath=sse. This assumes that the system on which Emacs runs is the same as where it was built, doesn't it? Is that assumption valid enough to do this by default? From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 16:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: mattiase@acm.org, monnier@iro.umontreal.ca, andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159388005230026 (code B ref 42147); Sat, 04 Jul 2020 16:28:02 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 16:27:32 +0000 Received: from localhost ([127.0.0.1]:59455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrl0l-0007oE-Vd for submit@debbugs.gnu.org; Sat, 04 Jul 2020 12:27:32 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrl0k-0007nz-4v for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 12:27:30 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7FEB71600EB; Sat, 4 Jul 2020 09:27:24 -0700 (PDT) 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 qyKOCUb7mX-3; Sat, 4 Jul 2020 09:27:23 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 98FC21600F1; Sat, 4 Jul 2020 09:27:23 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 Q2IkUxqMZhJt; Sat, 4 Jul 2020 09:27:23 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 57DEF1600EB; Sat, 4 Jul 2020 09:27:23 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRG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GWW5G ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> Date: Sat, 4 Jul 2020 09:27:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83zh8ftfwr.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/4/20 9:15 AM, Eli Zaretskii wrote: >> * configure.ac: On x86 with GCC, default to -msse2 -mfpmath=sse. > This assumes that the system on which Emacs runs is the same as where > it was built, doesn't it? It doesn't assume they're the same system. It merely assumes that build and host platforms both support SSE2, which is a safe assumption nowadays. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 16:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: mattiase@acm.org, Eli Zaretskii , andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159388044930726 (code B ref 42147); Sat, 04 Jul 2020 16:35:01 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 16:34:09 +0000 Received: from localhost ([127.0.0.1]:59461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrl7A-0007zV-LE for submit@debbugs.gnu.org; Sat, 04 Jul 2020 12:34:08 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrl78-0007z2-6g for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 12:34:07 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8C145101728; Sat, 4 Jul 2020 12:34:00 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id F339D1012E4; Sat, 4 Jul 2020 12:33:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593880439; bh=sZNFH+TeG8Cj8l0flo9UroZiDVXpf9A/2/afgM3Yl8g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QGIztj5jago37jav2e7/ZJ94JHCBOFCUAiecaKOllVGX0SjmvnfIsS+BMi1dxfPmF M9bXPK+k4aik+fRo5/kNiQSiA5qgPY9iiCSTm1+H7qMeKgYuuyWSmW55ZcPDkzMG8L vrFdYNaMosf7oRuEeTwpSYBOzTXkj3+ULjRS6bhtDGU56pmZHWEhu5yARTDY4xmOw6 sK+TaeppGWlYs+PHfsgcUvVeWn+IxY30m6s5q9givLQ9o4mrxBg75miUo3LMiNaaRs 20xHYdDGm/1N39/eaaKI0tg18Ujeh6S5pw6hUl1mtHH9mIZ1tk5wSNnUA1GaxOLo1d vv5UAZX0GPlgw== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A6BF71207A5; Sat, 4 Jul 2020 12:33:58 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> Date: Sat, 04 Jul 2020 12:33:57 -0400 In-Reply-To: <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> (Paul Eggert's message of "Sat, 4 Jul 2020 09:27:23 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.031 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> * configure.ac: On x86 with GCC, default to -msse2 -mfpmath=sse. >> This assumes that the system on which Emacs runs is the same as where >> it was built, doesn't it? > It doesn't assume they're the same system. It merely assumes that build and > host platforms both support SSE2, which is a safe assumption nowadays. Is there a way to tell gcc to try and avoid x87's idiosyncrasies without being platform-dependent (or at least without imposing SSE2, since I still use Emacs on my old Thinkpad X30)? Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 16:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Eli Zaretskii , Paul Eggert , andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159388105931668 (code B ref 42147); Sat, 04 Jul 2020 16:45:02 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 16:44:19 +0000 Received: from localhost ([127.0.0.1]:59472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrlH1-0008Ei-0Y for submit@debbugs.gnu.org; Sat, 04 Jul 2020 12:44:19 -0400 Received: from mail178c50.megamailservers.eu ([91.136.10.188]:53014 helo=mail70c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrlGy-0008EY-Ff for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 12:44:17 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593881047; bh=sX3t4tL7Z5cHo8ku/EVqswHo74kOHfhOvoG1lrjqjv0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=YXKe2zy0l5Fhnw24Q4bpzyMuhOPbcW94Fk0b2/4AIhO81UqZgk3RYybX5Kj9L+x97 8ibS5k697rpIG23MebutnVm+V1DIx6mQA6HQ2nw1pAlaFZC/LfqUXOrvFcoV44+XYO 3DswocPiIbVh1bOOyYpRf1tXFztkSa9GyrNxK9yg= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 064Gi3MC016685; Sat, 4 Jul 2020 16:44:05 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Sat, 4 Jul 2020 18:44:02 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <2766AC8F-EE7F-4897-A62B-CA9CB589CAF0@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F18.5F00B138.002A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OKBZIhSB c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=1_dpO95kjISq-TIGjAwA:9 a=CjuIK1q_8ugA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 4 juli 2020 kl. 18.33 skrev Stefan Monnier : > Is there a way to tell gcc to try and avoid x87's idiosyncrasies without > being platform-dependent (or at least without imposing SSE2, since > I still use Emacs on my old Thinkpad X30)? Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 4 juli 2020 kl. 18.33 skrev Stefan Monnier : > Is there a way to tell gcc to try and avoid x87's idiosyncrasies = without > being platform-dependent (or at least without imposing SSE2, since > I still use Emacs on my old Thinkpad X30)? There is -ffloat-store, which cures the 80 bit intermediary result = problem while retaining the double-rounding one (which tends to be less = common in practice). Maybe it is good enough? From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 17:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: mattiase@acm.org, Eli Zaretskii , andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.1593882050784 (code B ref 42147); Sat, 04 Jul 2020 17:01:01 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 17:00:50 +0000 Received: from localhost ([127.0.0.1]:59477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrlX0-0000Ca-Gv for submit@debbugs.gnu.org; Sat, 04 Jul 2020 13:00:50 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:32956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrlWw-0000CJ-Fk for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 13:00:49 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E01CB1600F1; Sat, 4 Jul 2020 10:00:40 -0700 (PDT) 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 4MUbFttygXcc; Sat, 4 Jul 2020 10:00:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 21B9B1600F3; Sat, 4 Jul 2020 10:00:40 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 ltuMN3OxDCkm; Sat, 4 Jul 2020 10:00:40 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A21221600F1; Sat, 4 Jul 2020 10:00:39 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.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VkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> Date: Sat, 4 Jul 2020 10:00:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/4/20 9:33 AM, Stefan Monnier wrote: > Is there a way to tell gcc to try and avoid x87's idiosyncrasies without > being platform-dependent (or at least without imposing SSE2, since > I still use Emacs on my old Thinkpad X30)? Not as far as I know. GCC's -fexcess-precision=standard option tries to do that, by causing GCC to convert 80-bit results to 64-bit results after every 80-bit operation. However, this still suffers from double-rounding on the x86 unless you also specify -msse2 -mfpmath=sse. (-fexcess-precision=standard supports the C standard better than the older -ffloat-store option, which generates code that is faster but has more double-rounding problems than -fexcess-precision=standard does.) Several GNU/Linux distributions have already dropped support for x86-only hardware like the circa-2001 Intel Mobile Pentium III-M in your laptop. On the distributions that still support i686, you can still build and run Emacs on your laptop (which has SSE but not SSE2) by configuring with CFLAGS='-msse -mfpmath=sse -fexcess-precision=standard'; this should avoid some (but not all) of the rounding problems. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 17:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: mattiase@acm.org, monnier@iro.umontreal.ca, andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15938826321799 (code B ref 42147); Sat, 04 Jul 2020 17:11:02 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 17:10:32 +0000 Received: from localhost ([127.0.0.1]:59517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrlgJ-0000Sl-Qq for submit@debbugs.gnu.org; Sat, 04 Jul 2020 13:10:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrlgH-0000SW-31 for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 13:10:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37349) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrlgA-0003Ok-Um; Sat, 04 Jul 2020 13:10:18 -0400 Received: from [176.228.60.248] (port=2307 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jrlgA-0005JB-Fb; Sat, 04 Jul 2020 13:10:18 -0400 Date: Sat, 04 Jul 2020 20:10:19 +0300 Message-Id: <83y2nztddw.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> (message from Paul Eggert on Sat, 4 Jul 2020 09:27:23 -0700) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: mattiase@acm.org, monnier@iro.umontreal.ca, andrea_corallo@yahoo.it, > 42147@debbugs.gnu.org > From: Paul Eggert > Date: Sat, 4 Jul 2020 09:27:23 -0700 > > On 7/4/20 9:15 AM, Eli Zaretskii wrote: > >> * configure.ac: On x86 with GCC, default to -msse2 -mfpmath=sse. > > This assumes that the system on which Emacs runs is the same as where > > it was built, doesn't it? > It doesn't assume they're the same system. It merely assumes that build and > host platforms both support SSE2, which is a safe assumption nowadays. What about the effect on the ABI? If Emacs compiled with these switches is linked against libraries compiled without them, could there be problems in the produced binary? From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 18:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: mattiase@acm.org, Stefan Monnier , andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159388788418647 (code B ref 42147); Sat, 04 Jul 2020 18:39:02 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 18:38:04 +0000 Received: from localhost ([127.0.0.1]:59608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrn31-0004qL-FC for submit@debbugs.gnu.org; Sat, 04 Jul 2020 14:38:04 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:42044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrn30-0004q9-8G for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 14:37:58 -0400 Received: by mail-oi1-f195.google.com with SMTP id t4so11211121oij.9 for <42147@debbugs.gnu.org>; Sat, 04 Jul 2020 11:37:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eycb36xOPEIlYhVfabfOER+PAXfujDqNUtMYfGhMzxs=; b=mgo7OnN08P2dyXkIhkcQwsb8foTcRvptznDo+sgKLsVHeaqi0g16WVH+f11G1Cxf7Z wBLDv0RCkOEmriH7sTBzsJMsW/mfOxFh4AwnIwSwdc/1zU6zWvY4TjS3Bm3HKESyVR/+ s7Z+dgW7MQ4TAsQr985u4MdWtq+3t0IcE2L4wQKG0D64f2SwBI2DSMhwBK56vt4QGyQP 4KDsvpOOVTnAYrx8yT7kftDsFvTpasX7QChkbYTulmEFamaTd/GF+JihrpbFqPkrlJJF 5xZ1tl85IlYrRLzBGu8Md2CmlYk457Idh3herXmNQF3zpW6mQn9U2UffMxnD1FtiE/4V 4bHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eycb36xOPEIlYhVfabfOER+PAXfujDqNUtMYfGhMzxs=; b=YmOo3fsxd+BaRaHV17pSa1in07C8Tg+CmmUwxQ30iD3dydk2SwaI8Z/KPyMqC6pdLi VOE1f7wPh1duY84myBdK3aaJHmXn+WZZJGsAJicrKXgehq8S79Vntl+ac/DZ9U2NTxJI 91iocHEDdx0PnhpVPrw2oD8p0su4xi/nKkQOt5rQupj6Hv+jslMSTmQ6s9XlKRDEiRrj PwjveMBQaK9tiZ6M9TpsH+vd2mDNrsIHPynhb95DZshm1AcwluPn3Fe53rILeoQktaWC lLCRVIiT15XKivSfQqzs/d0F+zz2XnRjN7lneLJINXlHAcTYnrBy6rn+FiK36hLE68om 1wwg== X-Gm-Message-State: AOAM530Ihiz0d6boSJr4GBjxf+n8lYKsa0FQ/JPFO+TzuFFx+reXxiMI FsxWV1QRN+MiIPeaUo65JaWbTd85OxGIFlXFN0Q= X-Google-Smtp-Source: ABdhPJwzpblQyvS45lwfRZhjMMqsw41SuekiPIqLmWPwjZlo7WewR83N3h/QRzoEyEMatV/1IE0I98glZOmz2TWrlKY= X-Received: by 2002:a05:6808:b14:: with SMTP id s20mr21203404oij.44.1593887872509; Sat, 04 Jul 2020 11:37:52 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> In-Reply-To: <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> From: Pip Cet Date: Sat, 4 Jul 2020 18:37:16 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, Jul 4, 2020 at 5:01 PM Paul Eggert wrote: > On 7/4/20 9:33 AM, Stefan Monnier wrote: > > Is there a way to tell gcc to try and avoid x87's idiosyncrasies without > > being platform-dependent (or at least without imposing SSE2, since > > I still use Emacs on my old Thinkpad X30)? > > Not as far as I know. GCC's -fexcess-precision=standard option tries to do that, > by causing GCC to convert 80-bit results to 64-bit results after every 80-bit > operation. However, this still suffers from double-rounding on the x86 unless > you also specify -msse2 -mfpmath=sse. (-fexcess-precision=standard supports the > C standard better than the older -ffloat-store option, which generates code that > is faster but has more double-rounding problems than -fexcess-precision=standard > does.) So it's a GCC bug? Wouldn't it be better to fix that? (The double-rounding issues you mention don't appear to be documented; but -fexcess-precision=standard is documented to be a nop if -mfpmath=sse is specified...) > Several GNU/Linux distributions have already dropped support for x86-only > hardware like the circa-2001 Intel Mobile Pentium III-M in your laptop. On the > distributions that still support i686, you can still build and run Emacs on your > laptop (which has SSE but not SSE2) by configuring with CFLAGS='-msse > -mfpmath=sse -fexcess-precision=standard'; this should avoid some (but not all) > of the rounding problems. I think we should either drop x86 entirely or support it, and the former is not yet an option. The minor issue fixed by dropping support for pre-SSE x86 can, if I understand the GCC docs correctly, be evaded by making sure the C code does the appropriate amount of casting. FWIW, SSE instructions require special OS support, too. We still have things like the (broken) snprintf implementation in sysdep.c, so people may be forgiven for getting the impression we care about non-typical hardware/OS combinations. I also think it's unwise to establish that Emacs uses 64-bit IEEE-754 floating point numbers exclusively. I'm inclined to believe that the current consensus on that particular format is likely to be temporary only. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 19:03:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: Eli Zaretskii , Stefan Monnier , andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159388932421078 (code B ref 42147); Sat, 04 Jul 2020 19:03:05 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 19:02:04 +0000 Received: from localhost ([127.0.0.1]:59651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrnQK-0005Tu-KM for submit@debbugs.gnu.org; Sat, 04 Jul 2020 15:02:04 -0400 Received: from mail78c50.megamailservers.eu ([91.136.10.88]:38482 helo=mail70c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrnQH-0005TS-5C for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 15:02:03 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593889310; bh=grPEC7EtHPcWRQyMymkoSZEYyIjcxk7kVN6l+JgCARU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=qPjnhypqmoKZ/QQ8RHnGJTV1Y0AzOlGGJlOpeOjEgL/lyMVlg7Oj9KV0FGD12DSlf QiXiMFkyv9uvD61NmgnUMKuAa/zbWaxocnxybTkb549/xeXsf/qGaM2uboepU/sqAp PUZCANYepk3jersO2zHKVW+B/8cNXTZ9EZoG6Q+s= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 064J1kpZ022785; Sat, 4 Jul 2020 19:01:48 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> Date: Sat, 4 Jul 2020 21:01:44 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <1F20D3F0-09CD-49F4-AF21-7350CA7D60A4@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F1B.5F00D21E.0014, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OKBZIhSB c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=9F_n0buN2XNRkDZ1WxMA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 4 juli 2020 kl. 19.00 skrev Paul Eggert : > Not as far as I know. GCC's -fexcess-precision=standard option tries to do that, > by causing GCC to convert 80-bit results to 64-bit results after every 80-bit > operation. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 4 juli 2020 kl. 19.00 skrev Paul Eggert : > Not as far as I know. GCC's -fexcess-precision=3Dstandard option tries = to do that, > by causing GCC to convert 80-bit results to 64-bit results after every = 80-bit > operation. Not quite after every operation: y =3D x * a + b; With -fexcess-precision=3Dstandard, the 80-bit result of the = multiplication will be used in the addition. With -ffloat-store, a = 64-bit store and reload will take place between the two operations, = forcing excess fraction bits to be discarded. Another option is to set the Precision Control field in the x87 control = word to 53-bit precision; that pretty much eliminates double rounding, = but still uses the extended exponent range (only matters in overflow and = underflow cases). And it may confuse libc's carefully crafted = floating-point functions. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 19:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: mattiase@acm.org, monnier@iro.umontreal.ca, andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159389081823377 (code B ref 42147); Sat, 04 Jul 2020 19:27:01 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 19:26:58 +0000 Received: from localhost ([127.0.0.1]:59680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrnoQ-00064z-4k for submit@debbugs.gnu.org; Sat, 04 Jul 2020 15:26:58 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:47120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrnoM-00064h-Te for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 15:26:56 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 78DE61600EB; Sat, 4 Jul 2020 12:26:49 -0700 (PDT) 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 ZbaxO0ZEaCeF; Sat, 4 Jul 2020 12:26:48 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9527C1600F1; Sat, 4 Jul 2020 12:26:48 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 dD77p67qkgKT; Sat, 4 Jul 2020 12:26:47 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 260121600EB; Sat, 4 Jul 2020 12:26:47 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <83y2nztddw.fsf@gnu.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1Y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VVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <7a9824a8-c8dd-42b0-e47d-423d105ba0a9@cs.ucla.edu> Date: Sat, 4 Jul 2020 12:26:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83y2nztddw.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/4/20 10:10 AM, Eli Zaretskii wrote: > What about the effect on the ABI? If Emacs compiled with these > switches is linked against libraries compiled without them, could > there be problems in the produced binary? No. These compiler options do not change the ABI. All that changes is the use of registers and temporaries within each function, not how the function deals with callers, callees, or storage visible to callers or callees. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 21:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Pip Cet Cc: mattiase@acm.org, Paul Eggert , andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159389673332554 (code B ref 42147); Sat, 04 Jul 2020 21:06:01 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 21:05:33 +0000 Received: from localhost ([127.0.0.1]:59750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrpLo-0008T0-Si for submit@debbugs.gnu.org; Sat, 04 Jul 2020 17:05:33 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrpLl-0008Sm-W3 for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 17:05:31 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 840EF80599; Sat, 4 Jul 2020 17:05:24 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7E772806CD; Sat, 4 Jul 2020 17:05:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593896722; bh=eDjE6Ou0HnIZRINfBI6K8bCGLthZmIlWZems7kb+2k0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=oq6D01TX2/OFg1MU0IKlJzNWnWzq8txqR491drLDRbw04aTmEfZ94CeWgeN4wtd7v GzGep7hOIFGbxUV734Sr82ewioKgeY5kEOwlteJ8KkR6ZfQMWWf5ePY/fHm/91WWL8 NLSj5zdUqeMEayfUbnAeqtKUW+gfunw+weXsfeEQmPkyqnZvVYptIpCvAXj16uLkGv 4aCbbdyjD8v/Tm3lr4d9uuSl8n5cTgGI5cXVIit7JNUObyCvRLIt0GF5hwJgYRGUcC Rzt3vxgdho1GrVJc9zvziNc4iMt0lUWjaLU+35tDzUtUOZeN5ifJrQ4v5EHNrtaoO4 9QxrvoCkHt1nw== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2E0AA120873; Sat, 4 Jul 2020 17:05:22 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> Date: Sat, 04 Jul 2020 17:05:20 -0400 In-Reply-To: (Pip Cet's message of "Sat, 4 Jul 2020 18:37:16 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.019 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > So it's a GCC bug? Wouldn't it be better to fix that? Not really, no: the x87 hardware makes it difficult to get the exact behavior of 64bit floats, so either you live with "almost" the right behavior or you don't use the x87 hardware (which on pre-SSE2 hardware implies a massive slow down on floating point operations). >> Several GNU/Linux distributions have already dropped support for x86-only >> hardware like the circa-2001 Intel Mobile Pentium III-M in your laptop. On the >> distributions that still support i686, you can still build and run Emacs on your >> laptop (which has SSE but not SSE2) by configuring with CFLAGS='-msse >> -mfpmath=sse -fexcess-precision=standard'; this should avoid some (but not all) >> of the rounding problems. If I need to change the flags, then I'm much more likely to just use the "normal" compilation option: I actually couldn't care less about the potential differences in rounding. I'm actually not completely sure why we care about those minor rounding differences. After all, even if we use SSE2, there's no guarantee that the output of `sin` in one version of Emacs will be exactly the same as in another version of Emacs. And while I know that there's some hope that those differences will disappear in some distant future (since someone finally figured out how to implement `sin` efficiently with perfect rounding), I don't think we'll be able to rely on that any time soon, and I don't see why `+` should not be allowed to vary wile `sin` is. Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 22:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: mattiase@acm.org, Paul Eggert , andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15939016007944 (code B ref 42147); Sat, 04 Jul 2020 22:27:02 +0000 Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 22:26:40 +0000 Received: from localhost ([127.0.0.1]:59790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrqcK-000243-2R for submit@debbugs.gnu.org; Sat, 04 Jul 2020 18:26:40 -0400 Received: from mail-oi1-f175.google.com ([209.85.167.175]:46483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrqcH-00023k-US for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 18:26:39 -0400 Received: by mail-oi1-f175.google.com with SMTP id l63so27844063oih.13 for <42147@debbugs.gnu.org>; Sat, 04 Jul 2020 15:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QH9tS8d9obNJvghmeSAkh9Ai8a4zOQHdgLwLob2YU64=; b=PFKE/17VQhplwjNqts+uhRUKs1H5X5lZxS4rnzKtA338Dk2SRTWkjnu+R/BkaY8vAv eCe1UbRTKAdmZxkU1zomHz/eP1hIA6savBayD344QiT/1qjZL4+LJQohUH7+A1o2sg6P yy4Qc/+635XT710+dI4fMs78Jfw2PkhKQgH50MKakdoS+k1a1YVYjVyOw3WFTHfYDE7x rmTvzvu1+7MWKiuUeFarahw74BavYHNOvf3ZaTnUNxOl5WCk/AOLUxRsIaTsMoYzEnNh /7QGLnf2Lg1hoTDbfTWwkU0W7lpryC0IAWO/xah2GsxrdOZ8NzIlxAlN3wU2l+3aRupK 1Yxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QH9tS8d9obNJvghmeSAkh9Ai8a4zOQHdgLwLob2YU64=; b=NU6rGnhgy4xIqiLBwHARvIe8cflEi5EnjL3cXgTyr+6UebPjLGOFDD/jhMQ/GORShj cwPU51TCYmXKeYuNLTx3/rr+Ezv0Dq4Xu0wYaoPbQsZk1QyA+738hTEPLAboZHLFfKhI 50jY8ZiU3JltwHcB2WEdGnFqC9YVUXpooray7LqKEekHbEWX6/zsRLYkDfG3ad3GvRmz fTrrOU1wVOU6B3wnv8JWdYu4iKTsPfafQ7fCL5317yw/Wj9Rk4wEPHDAG9PMms3l0M46 JCRSEzhCeYEaHJHlKk0kqWsZycGcAF2XOQtQ4AJWpsPk1kC1g/2CEVASWQ/wISFxQtnU CVvA== X-Gm-Message-State: AOAM532UqM4o5T/hlZAaPwWHAI5IbvztfG5MW9JjMsE2HLaTzH6lpUvf NMSLhRz00AkVqns1ymCb42zv6k6PWRNdk6kDmtY= X-Google-Smtp-Source: ABdhPJyq28/brVtkruybS/ZSSUW22+z27uRFdtVDujtK1IsrgKgo9NWOdVGJEv3rhbe+yNu4PvEFhVMDgfUwpXiiibM= X-Received: by 2002:aca:b155:: with SMTP id a82mr31141276oif.122.1593901592295; Sat, 04 Jul 2020 15:26:32 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> In-Reply-To: From: Pip Cet Date: Sat, 4 Jul 2020 22:25:55 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, Jul 4, 2020 at 9:05 PM Stefan Monnier wrote: > > So it's a GCC bug? Wouldn't it be better to fix that? > > Not really, no: the x87 hardware makes it difficult to get the exact > behavior of 64bit floats, so either you live with "almost" the right > behavior or you don't use the x87 hardware (which on pre-SSE2 hardware > implies a massive slow down on floating point operations). Precisely. Those are the two options GCC should offer, instead of (or in addition to) three degrees of wrongness. This is obsolete hardware which does not, apparently, provide any support for adding two IEEE 754 64-bit floats. Pretending it does is not helpful and, at the very least, a bug in the documentation. > >> Several GNU/Linux distributions have already dropped support for x86-only > >> hardware like the circa-2001 Intel Mobile Pentium III-M in your laptop. On the > >> distributions that still support i686, you can still build and run Emacs on your > >> laptop (which has SSE but not SSE2) by configuring with CFLAGS='-msse > >> -mfpmath=sse -fexcess-precision=standard'; this should avoid some (but not all) > >> of the rounding problems. FWIW, that doesn't seem to have any effect here, it just uses x87 instructions. > If I need to change the flags, then I'm much more likely to just use the > "normal" compilation option: I actually couldn't care less about the > potential differences in rounding. > > I'm actually not completely sure why we care about those minor > rounding differences. Neither am I. If the idea is to standardize Emacs on a single floating-point representation, let's at least use the 61-bit floats Paul suggested a while back? (Incidentally, I believe those can be implemented somewhat more efficiently on x87 hardware). Or we could go with bignum ratios or GMP floats. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 02:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Pip Cet Cc: mattiase@acm.org, eggert@cs.ucla.edu, monnier@iro.umontreal.ca, andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159391673931150 (code B ref 42147); Sun, 05 Jul 2020 02:39:01 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 02:38:59 +0000 Received: from localhost ([127.0.0.1]:59911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jruYV-00086J-2Q for submit@debbugs.gnu.org; Sat, 04 Jul 2020 22:38:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jruYT-000867-Hv for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 22:38:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57077) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jruYN-0006Mi-Ku; Sat, 04 Jul 2020 22:38:51 -0400 Received: from [176.228.60.248] (port=1637 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jruYN-0001xF-0l; Sat, 04 Jul 2020 22:38:51 -0400 Date: Sun, 05 Jul 2020 05:38:55 +0300 Message-Id: <83lfjyu1mo.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Pip Cet on Sat, 4 Jul 2020 22:25:55 +0000) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Pip Cet > Date: Sat, 4 Jul 2020 22:25:55 +0000 > Cc: mattiase@acm.org, Paul Eggert , andrea_corallo@yahoo.it, > 42147@debbugs.gnu.org > > > I'm actually not completely sure why we care about those minor > > rounding differences. > > Neither am I. If the idea is to standardize Emacs on a single > floating-point representation, let's at least use the 61-bit floats > Paul suggested a while back? (Incidentally, I believe those can be > implemented somewhat more efficiently on x87 hardware). Or we could go > with bignum ratios or GMP floats. Some other relevant questions: . why didn't GCC folks made SSE2 the default output? shouldn't Emacs follow the defaults, and leave it to the experts to decide which instruction set should be the default? . which other projects use this non-standard instruction set? GNU Guile, for example, doesn't, so why should we? From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 08:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , Pip Cet Cc: mattiase@acm.org, monnier@iro.umontreal.ca, andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159393773631915 (code B ref 42147); Sun, 05 Jul 2020 08:29:02 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 08:28:56 +0000 Received: from localhost ([127.0.0.1]:59988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js01A-0008Ih-40 for submit@debbugs.gnu.org; Sun, 05 Jul 2020 04:28:56 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:49048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js017-0008IU-B7 for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 04:28:55 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CE0F6160084; Sun, 5 Jul 2020 01:28:47 -0700 (PDT) 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 09wv5mmSdi7D; Sun, 5 Jul 2020 01:28:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id F16ED1600DA; Sun, 5 Jul 2020 01:28:46 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 2Wrj6v5tbv08; Sun, 5 Jul 2020 01:28:46 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B113B160084; Sun, 5 Jul 2020 01:28:46 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> <83lfjyu1mo.fsf@gnu.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV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JsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> Date: Sun, 5 Jul 2020 01:28:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83lfjyu1mo.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/4/20 7:38 PM, Eli Zaretskii wrote: > . which other projects use this non-standard instruction set? Wait a minute, SSE2 is not "non-standard". It was introduced in 2000 as part of the evolving Intel/AMD x86 instruction set, and is supported by pretty much every x86-compatible chip that first shipped after 2003-or-so and that is a plausible candidate for Emacs. (Stefan's old laptop uses a circa-2001 chip.) To get back to your question, many software projects already require SSE2 on x86. This includes Chromium since build 35 (2014), Firefox since Firefox 53 (2017), and WebKit2GTK since version 2.24.0 (2019). Since Emacs links to WebKit2GTK by default, recent Emacs by default already requires SSE2 on x86. Similarly, many Gnome applications require SSE2 on x86, as they also link to WebKit2GTK. Among proprietary systems, Mac OS X on x86 (2006-2011) always required SSE2, and MS-Windows development platforms have been requiring SSE2 by default since 2012, which means pretty much every application built for 32-bit MS-Windows requires SSE2 nowadays. Also, all supported MS-Windows operating systems have required SSE2 since 2018, which is when Microsoft pushed out an update for MS-Windows 7 that required SSE2. So it would not at all be outlandish for Emacs to default to requiring SSE2 on GNU/Linux x86 (particularly since it does so already :-). > . why didn't GCC folks made SSE2 the default output? I suspect they think x86 is on its way out and not worth worrying about. Which is a valid point of view. After all, Microsoft dropped distributing 32-bit builds for MS-Windows starting with the May 2020 update, and they're pretty conservative about this sort of thing. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 08:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: Pip Cet , mattiase@acm.org, 42147@debbugs.gnu.org, monnier@iro.umontreal.ca, andrea_corallo@yahoo.it, Eli Zaretskii Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.1593938349452 (code B ref 42147); Sun, 05 Jul 2020 08:40:02 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 08:39:09 +0000 Received: from localhost ([127.0.0.1]:59998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js0B3-00007E-CF for submit@debbugs.gnu.org; Sun, 05 Jul 2020 04:39:09 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:33753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js0B1-000074-6Q for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 04:39:08 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4B02DS3hYrz1qrfg; Sun, 5 Jul 2020 10:39:04 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4B02DS2Ztzz1qrFH; Sun, 5 Jul 2020 10:39:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id M8WUT5WkLoBN; Sun, 5 Jul 2020 10:39:03 +0200 (CEST) X-Auth-Info: j+6WbCD2Tg8mLQ+k6rRlO/qGusY7G9+y6rGDg6UJs1tRiWPjLXRqL7VXQocimVxK Received: from hase.home (ppp-46-244-191-0.dynamic.mnet-online.de [46.244.191.0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 5 Jul 2020 10:39:03 +0200 (CEST) Received: by hase.home (Postfix, from userid 1000) id 9485910175D; Sun, 5 Jul 2020 10:39:02 +0200 (CEST) From: Andreas Schwab References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> <83lfjyu1mo.fsf@gnu.org> <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> X-Yow: TONY RANDALL! Is YOUR life a PATIO of FUN?? Date: Sun, 05 Jul 2020 10:39:02 +0200 In-Reply-To: <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> (Paul Eggert's message of "Sun, 5 Jul 2020 01:28:46 -0700") Message-ID: <87pn9awe3d.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Jul 05 2020, Paul Eggert wrote: >> . why didn't GCC folks made SSE2 the default output? > > I suspect they think x86 is on its way out and not worth worrying > about. It all depends on how you configure it. You can make -mfpmath=sse the default if you like, but gcc still supports pre-SSE2 configurations. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 09:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Pip Cet Cc: mattiase@acm.org, Stefan Monnier , andrea_corallo@yahoo.it, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15939429937470 (code B ref 42147); Sun, 05 Jul 2020 09:57:01 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 09:56:33 +0000 Received: from localhost ([127.0.0.1]:60054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js1Nx-0001wQ-JE for submit@debbugs.gnu.org; Sun, 05 Jul 2020 05:56:33 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:54110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js1Nv-0001wD-8G for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 05:56:32 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D287D160084; Sun, 5 Jul 2020 02:56:24 -0700 (PDT) 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 ia7xvO3LaH0v; Sun, 5 Jul 2020 02:56:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E7159160093; Sun, 5 Jul 2020 02:56:23 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 GuhGwsxFxlmo; Sun, 5 Jul 2020 02:56:23 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id AC152160084; Sun, 5 Jul 2020 02:56:23 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FN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OExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: Date: Sun, 5 Jul 2020 02:56:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/4/20 11:37 AM, Pip Cet wrote: > So it's a GCC bug? Wouldn't it be better to fix that? Not without such a performance hit that nobody has wanted to do it. I expect it would need software emulation for most floating-point operations. Also, in theory the Linux kernel could emulate missing SSE2 instructions. However, this is another workaround that nobody has wanted to do because it's not worth the hassle to support these old CPUs. > (The double-rounding issues you mention don't appear to be documented; It's obvious from the generated code. -fexcess-precision doesn't mean floating-point operations conform to IEEE-754 double; all it means is that floating-point values are representable as IEEE-754 double. This is why one cannot rely on -fexcess-precision=standard to get reproducible results. > The minor issue fixed by dropping support > for pre-SSE x86 can, if I understand the GCC docs correctly, be evaded > by making sure the C code does the appropriate amount of casting. That won't suffice. On x87+387, GCC preserves excess precision through casts, even if -ffloat-store is specified. > SSE instructions require special OS support, too. The Linux kernel has supported SSE2 since Linux 2.4 (2001). Any Linux kernel that doesn't support SSE2 is so old that I suspect it won't run current Emacs anyway, for other reasons. > I also think it's unwise to establish that Emacs uses 64-bit IEEE-754 > floating point numbers exclusively. What, will we switch to IBM mainframe floating-point format? :-) Part of the problem we're trying to solve here is rounding discrepancies between build-time and run-time computation. The idea is that an Elisp floating-point operation should yield the same value regardless of whether it's byte-compiled (or even machine-compiled, if we want to do that). Even if Emacs changed floating-point format (by stealing a few bits for tags, say), we'd still run into the same problem. PS. I finally got around to benchmarking, and on my usual benchmark (make compile-always, Fedora 31 x86), using SSE2 sped up Emacs by 4.6%. So there is a performance argument for the change as well as a fix-the-rounding-glitches argument. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 10:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: mattiase@acm.org, andrea_corallo@yahoo.it, Stefan Monnier , Pip Cet , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15939434258225 (code B ref 42147); Sun, 05 Jul 2020 10:04:01 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 10:03:45 +0000 Received: from localhost ([127.0.0.1]:60065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js1Uu-00028a-LO for submit@debbugs.gnu.org; Sun, 05 Jul 2020 06:03:44 -0400 Received: from mx.sdf.org ([205.166.94.23]:55819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js1Uq-00028Q-0X for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 06:03:43 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 065A3KAK029081; Sun, 5 Jul 2020 10:03:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sdf.org; s=default; t=1593943404; bh=3wrqDGIus+sUS/wBjSU4ZrqvhOmSsWlzkJNv6X2SaY8=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=RpAGAock2xIubhq7o9XXucqHYXsq2bQUy28VN7QgoCmfNudtqYJytfRl+yC5LDZYx DFqMEj+VTYJk91lMwjlu0pGhufCHqWefajCV15xrhRWFBARxwwj8xSPIwBDDSqfPFO CH82P4FN9SPBXu27viq15p2JBZLbiqjh+ol6Sbts= From: Andrea Corallo References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> Date: Sun, 05 Jul 2020 10:03:20 +0000 In-Reply-To: (Paul Eggert's message of "Sun, 5 Jul 2020 02:56:23 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Paul Eggert writes: > PS. I finally got around to benchmarking, and on my usual benchmark (make > compile-always, Fedora 31 x86), using SSE2 sped up Emacs by 4.6%. So there is a > performance argument for the change as well as a fix-the-rounding-glitches argument. Hi Paul, Wow I'm really surprised by this result! Are we doing so much floating point while compiling Emacs? I expected it to be very marginal, possibly something else is boiling here we are not considering? Regards Andrea -- akrl@sdf.org From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 13:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15939540558436 (code B ref 42147); Sun, 05 Jul 2020 13:01:02 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 13:00:55 +0000 Received: from localhost ([127.0.0.1]:60178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js4GM-0002C0-Hf for submit@debbugs.gnu.org; Sun, 05 Jul 2020 09:00:55 -0400 Received: from mail212c50.megamailservers.eu ([91.136.10.222]:35668 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js4GK-0002Bl-Ob for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 09:00:53 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593954037; bh=JucY2oXBkJkGZLUPsiFj8YIZvfVMxxWTGSGvecGTRQY=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=PdvMbLvqhZm41/fKQYGiTKcyCtQKouQBOleCF6+rWCtBL5qk+FTKXxzpm6i2lKXKQ wUJNUVmjeqqyBWCMEIuiCX6t95amrjfMjXptj1QKwvWJNv39AHS21RAZUWQ4b9Rqfl F5UxfRycfrcYX9x/YYx2dZCNbYbXsOyMuWe1H1nE= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 065D0XxE026262; Sun, 5 Jul 2020 13:00:35 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_8AE3DB23-A143-4FDD-B6CD-42CF468A6EDA" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Date: Sun, 5 Jul 2020 15:00:32 +0200 In-Reply-To: <1690361185.4397117.1593879228865@mail.yahoo.com> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F16.5F01CEF5.0057, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KsozJleN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=xqM3wO8aiJJCaqFe2MkA:9 a=CjuIK1q_8ugA:10 a=U7s5LNZHvtAvlAXazu8A:9 a=B2y7HmGcmWMA:10 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_8AE3DB23-A143-4FDD-B6CD-42CF468A6EDA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 4 juli 2020 kl. 18.13 skrev Andrea Corallo : > (defun bbb () > (let ((x (list 1 2))) > (f x) ; f is not pure > (1+ (car x)) ; <=3D cannot optimize > )) (A more precise property for 'f' in your examples would be = 'side-effect-free' rather than 'pure'.) > BTW reading the code of the native compiler I realized I am already > extrapolating for use a very similar list of optimizable functions to = the one > proposed. I still think would quite cleaner to classify these in > byte-opt.el. Certainly, but be sure to state your criteria with clarity. There must = be no doubt whether or not a function should have a certain property! > Attached the updated patch where I'm adding car, car-safe, cdr, > cdr-safe, max, min. Thank you Andrea! Attached is an update with the following = modifications: * I tried to segregate pure functions that operate on mutable objects, = such as car, length and equal, from the rest. This way we can more = easily separate them entirely (using different properties) later on if = desired. * The list of pure functions was expanded further. Related functions = were grouped rather than ordered alphabetically, because I found it = easier to read this way -- you may disagree. * 'expt' was prudently removed because it doesn't necessarily give = portable results for arbitrary floating-point arguments. (exp, sin etc = were not included either for the same reason.) * It turned out that in order to bootstrap, we have to prevent the = constant evaluation in the byte compiler from raising errors on invalid = input. For example, the macro dired-map-over-marks expands to = (essentially) (if (integerp ARG) (< ARG 0) where ARG is a macro argument that can be nil. Since < is now pure, = compilation would fail despite the offending code being unreachable. As = this style of code exists and is not unreasonable, the error has to be = suppressed. --Apple-Mail=_8AE3DB23-A143-4FDD-B6CD-42CF468A6EDA Content-Disposition: attachment; filename=0001-Mark-more-functions-pure-bug-42147.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Mark-more-functions-pure-bug-42147.patch" Content-Transfer-Encoding: quoted-printable =46rom=20bc387b56233798fb5a2a821c58632ca9c8a9044b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Sun,=205=20Jul=202020=2013:47:34=20+0200=0A= Subject:=20[PATCH]=20Mark=20more=20functions=20pure=20(bug#42147)=0A=0A= Extend=20the=20list=20of=20'pure'=20functions=20to=20many=20predicates=20= and=20numerical=0Afunctions=20that=20we=20are=20reasonably=20confident=20= will=20give=20portable=20results.=0AAlso=20include=20various=20list=20= and=20array=20accessors,=20because=20our=20use=20of=20purity=0Ain=20the=20= byte=20compiler=20isn't=20affected=20by=20the=20mutability=20of=20= arguments.=0A=0A*=20lisp/emacs-lisp/byte-opt.el:=20Update=20example=20in=20= comment.=0A(pure-fns):=20Add=20many=20functions.=0A= (byte-optimize-form-code-walker)=20Don't=20signal=20errors=20during=20= evaluation=0Aof=20calls=20to=20pure=20functions=20with=20constant=20= arguments=20at=20compile=20time,=0Asince=20such=20calls=20are=20not=20= necessarily=20reachable.=0A---=0A=20lisp/emacs-lisp/byte-opt.el=20|=2049=20= +++++++++++++++++++++++++++++++------=0A=201=20file=20changed,=2042=20= insertions(+),=207=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/byte-opt.el=20b/lisp/emacs-lisp/byte-opt.el=0Aindex=20= bf9e6a728a..92c2374a07=20100644=0A---=20a/lisp/emacs-lisp/byte-opt.el=0A= +++=20b/lisp/emacs-lisp/byte-opt.el=0A@@=20-557,7=20+557,10=20@@=20= byte-optimize-form-code-walker=0A=20=09=20=20=20(let=20((args=20(mapcar=20= #'byte-optimize-form=20(cdr=20form))))=0A=20=09=20=20=20=20=20(if=20(and=20= (get=20fn=20'pure)=0A=20=09=09=20=20=20=20=20=20= (byte-optimize-all-constp=20args))=0A-=09=09=20=20=20(list=20'quote=20= (apply=20fn=20(mapcar=20#'eval=20args)))=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(let=20((arg-values=20(mapcar=20#'eval=20args)))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (condition-case=20nil=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(list=20'quote=20(apply=20fn=20arg-values))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(error=20(cons=20= fn=20args))))=0A=20=09=20=20=20=20=20=20=20(cons=20fn=20args)))))))=0A=20= =0A=20(defun=20byte-optimize-all-constp=20(list)=0A@@=20-1274,9=20= +1277,9=20@@=20byte-optimize-set=0A=20;;=20Pure=20functions=20are=20= side-effect=20free=20functions=20whose=20values=20depend=0A=20;;=20only=20= on=20their=20arguments,=20not=20on=20the=20platform.=20=20For=20these=20= functions,=0A=20;;=20calls=20with=20constant=20arguments=20can=20be=20= evaluated=20at=20compile=20time.=0A-;;=20This=20may=20shift=20runtime=20= errors=20to=20compile=20time.=20=20For=20example,=20logand=0A-;;=20is=20= pure=20since=20its=20results=20are=20machine-independent,=20whereas=20= ash=20is=0A-;;=20not=20pure=20because=20(ash=201=2029)'s=20value=20= depends=20on=20machine=20word=20size.=0A+;;=20For=20example,=20ash=20is=20= pure=20since=20its=20results=20are=20machine-independent,=0A+;;=20= whereas=20lsh=20is=20not=20pure=20because=20(lsh=20-1=20-1)'s=20value=20= depends=20on=20the=0A+;;=20fixnum=20range.=0A=20;;=0A=20;;=20When=20= deciding=20whether=20a=20function=20is=20pure,=20do=20not=20worry=20= about=0A=20;;=20mutable=20strings=20or=20markers,=20as=20they=20are=20so=20= unlikely=20in=20real=20code=0A@@=20-1286,9=20+1289,41=20@@=20= byte-optimize-set=0A=20;;=20values=20if=20a=20marker=20is=20moved.=0A=20=0A= =20(let=20((pure-fns=0A-=20=20=20=20=20=20=20'(%=20concat=20logand=20= logcount=20logior=20lognot=20logxor=0A-=09=20regexp-opt=20regexp-quote=0A= -=09=20string-to-char=20string-to-syntax=20symbol-name)))=0A+=20=20=20=20= =20=20=20'(concat=20regexp-opt=20regexp-quote=0A+=09=20string-to-char=20= string-to-syntax=20symbol-name=0A+=20=20=20=20=20=20=20=20=20eq=20eql=0A= +=20=20=20=20=20=20=20=20=20=3D=20/=3D=20<=20<=3D=20=3D>=20>=20min=20max=0A= +=20=20=20=20=20=20=20=20=20+=20-=20*=20/=20%=20mod=20abs=20ash=201+=20= 1-=20sqrt=0A+=20=20=20=20=20=20=20=20=20logand=20logior=20lognot=20= logxor=20logcount=0A+=20=20=20=20=20=20=20=20=20copysign=20isnan=20ldexp=20= float=20logb=0A+=20=20=20=20=20=20=20=20=20floor=20ceiling=20round=20= truncate=0A+=20=20=20=20=20=20=20=20=20ffloor=20fceiling=20fround=20= ftruncate=0A+=20=20=20=20=20=20=20=20=20string=3D=20string-equal=20= string<=20string-lessp=0A+=20=20=20=20=20=20=20=20=20consp=20atom=20= listp=20nlistp=20propert-list-p=0A+=20=20=20=20=20=20=20=20=20sequencep=20= arrayp=20vectorp=20stringp=20bool-vector-p=20hash-table-p=0A+=20=20=20=20= =20=20=20=20=20null=20not=0A+=20=20=20=20=20=20=20=20=20numberp=20= integerp=20floatp=20natnump=20characterp=0A+=20=20=20=20=20=20=20=20=20= integer-or-marker-p=20number-or-marker-p=20char-or-string-p=0A+=20=20=20=20= =20=20=20=20=20symbolp=20keywordp=0A+=20=20=20=20=20=20=20=20=20type-of=0A= +=20=20=20=20=20=20=20=20=20identity=20ignore=0A+=0A+=20=20=20=20=20=20=20= =20=20;;=20The=20following=20functions=20are=20pure=20up=20to=20mutation=20= of=20their=0A+=20=20=20=20=20=20=20=20=20;;=20arguments.=20=20This=20is=20= pure=20enough=20for=20the=20purposes=20of=0A+=20=20=20=20=20=20=20=20=20= ;;=20constant=20folding,=20but=20not=20necessarily=20for=20all=20kinds=20= of=0A+=20=20=20=20=20=20=20=20=20;;=20code=20motion.=0A+=20=20=20=20=20=20= =20=20=20car=20cdr=20car-safe=20cdr-safe=20nth=20nthcdr=20last=0A+=20=20=20= =20=20=20=20=20=20equal=0A+=20=20=20=20=20=20=20=20=20length=20= safe-length=0A+=20=20=20=20=20=20=20=20=20memq=20memql=20member=0A+=20=20= =20=20=20=20=20=20=20;;=20`assoc'=20and=20`assoc-default'=20are=20= excluded=20since=20they=20are=0A+=20=20=20=20=20=20=20=20=20;;=20impure=20= if=20the=20test=20function=20is=20(consider=20`string-match').=0A+=20=20=20= =20=20=20=20=20=20assq=20assql=20rassq=20rassoc=0A+=20=20=20=20=20=20=20=20= =20plist-get=20lax-plist-get=20plist-member=0A+=20=20=20=20=20=20=20=20=20= aref=20elt=0A+=20=20=20=20=20=20=20=20=20bool-vector-subsetp=0A+=20=20=20= =20=20=20=20=20=20bool-vector-count-population=20= bool-vector-count-consecutive=0A+=20=20=20=20=20=20=20=20=20)))=0A=20=20=20= (while=20pure-fns=0A=20=20=20=20=20(put=20(car=20pure-fns)=20'pure=20t)=0A= =20=20=20=20=20(setq=20pure-fns=20(cdr=20pure-fns)))=0A--=20=0A2.21.1=20= (Apple=20Git-122.3)=0A=0A= --Apple-Mail=_8AE3DB23-A143-4FDD-B6CD-42CF468A6EDA-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 13:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15939549879766 (code B ref 42147); Sun, 05 Jul 2020 13:17:02 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 13:16:27 +0000 Received: from localhost ([127.0.0.1]:60188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js4VO-0002XS-Tk for submit@debbugs.gnu.org; Sun, 05 Jul 2020 09:16:27 -0400 Received: from mx.sdf.org ([205.166.94.23]:57343) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js4VK-0002XI-Tv for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 09:16:25 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 065DGEHd002991; Sun, 5 Jul 2020 13:16:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sdf.org; s=default; t=1593954978; bh=kXXiQ8mc+U1j9ewkvpqb7R1WLZa+gAd2oes3inrO3vg=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=V3v31rmQWsIFo1STjkIglwRVLO3Yx78WtmN+KiE1RVdWbruIuQXQTTKsDa0U6H12W lpIa3klCRLjYC5cUgk2CyXAfEncrfRsfuNcXTNgC8TWkgKb3jH3OnythhfuyHRsdrn aYFMQCDAG76f1k9w+cW1xKUayhsrgWaLwlNgsCqw= From: Andrea Corallo References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> Date: Sun, 05 Jul 2020 13:16:13 +0000 In-Reply-To: <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> ("Mattias \=\?utf-8\?Q\?Engdeg\=C3\=A5rd\=22's\?\= message of "Sun, 5 Jul 2020 15:00:32 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 4 juli 2020 kl. 18.13 skrev Andrea Corallo : > >> (defun bbb () >> (let ((x (list 1 2))) >> (f x) ; f is not pure >> (1+ (car x)) ; <=3D cannot optimize >> )) > > (A more precise property for 'f' in your examples would be 'side-effect-f= ree' rather than 'pure'.) Right good point! >> BTW reading the code of the native compiler I realized I am already >> extrapolating for use a very similar list of optimizable functions to th= e one >> proposed. I still think would quite cleaner to classify these in >> byte-opt.el. > > Certainly, but be sure to state your criteria with clarity. There must be= no doubt whether or not a function should have a certain property! Absolutley, actually part of the scope of the patch in discussion (for me) is exactly this given I'll just fetch this as a definition. Thanks for improving the patch! Andrea --=20 akrl@sdf.org From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 14:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: mattiase@acm.org, andrea_corallo@yahoo.it, monnier@iro.umontreal.ca, pipcet@gmail.com, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159396047218549 (code B ref 42147); Sun, 05 Jul 2020 14:48:02 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 14:47:52 +0000 Received: from localhost ([127.0.0.1]:32853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js5vo-0004p3-4O for submit@debbugs.gnu.org; Sun, 05 Jul 2020 10:47:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js5vk-0004op-Ob for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 10:47:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33516) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1js5ve-0000Cy-C0; Sun, 05 Jul 2020 10:47:38 -0400 Received: from [176.228.60.248] (port=2550 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1js5vd-0005Cf-JA; Sun, 05 Jul 2020 10:47:38 -0400 Date: Sun, 05 Jul 2020 17:47:42 +0300 Message-Id: <83a70et3w1.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> (message from Paul Eggert on Sun, 5 Jul 2020 01:28:46 -0700) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> <83lfjyu1mo.fsf@gnu.org> <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: monnier@iro.umontreal.ca, mattiase@acm.org, andrea_corallo@yahoo.it, > 42147@debbugs.gnu.org > From: Paul Eggert > Date: Sun, 5 Jul 2020 01:28:46 -0700 > > On 7/4/20 7:38 PM, Eli Zaretskii wrote: > > > . which other projects use this non-standard instruction set? > > Wait a minute, SSE2 is not "non-standard". It was introduced in 2000 as part of > the evolving Intel/AMD x86 instruction set, and is supported by pretty much > every x86-compatible chip that first shipped after 2003-or-so and that is a > plausible candidate for Emacs. (Stefan's old laptop uses a circa-2001 chip.) That's not what I meant: I meant "non-standard" in the sense that the compiler doesn't generate these instructions by default when dealing with FP calculations. > To get back to your question, many software projects already require SSE2 on > x86. This includes Chromium since build 35 (2014), Firefox since Firefox 53 > (2017), and WebKit2GTK since version 2.24.0 (2019). Since Emacs links to > WebKit2GTK by default, recent Emacs by default already requires SSE2 on x86. > Similarly, many Gnome applications require SSE2 on x86, as they also link to > WebKit2GTK. > > Among proprietary systems, Mac OS X on x86 (2006-2011) always required SSE2, and > MS-Windows development platforms have been requiring SSE2 by default since 2012, > which means pretty much every application built for 32-bit MS-Windows requires > SSE2 nowadays. Also, all supported MS-Windows operating systems have required > SSE2 since 2018, which is when Microsoft pushed out an update for MS-Windows 7 > that required SSE2. Thanks, I knew all that. Emacs is not an OS, it's an application, and the issue here is about using these instructions for FP calculations, not for anything else. That was what I was asking about: applications doing FP math. > > . why didn't GCC folks made SSE2 the default output? > > I suspect they think x86 is on its way out and not worth worrying about. Then why won't we do the same, and simply ignore the issue? We have enough real development and maintenance work on our hands. Making non-trivial change in the code we produce for Emacs, for the benefit of (at best) insignificant speed improvement on a dying platform, while risking breakage for at least some systems, is not a good use of our scarce resources, IMO. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 15:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: mattiase@acm.org, Eli Zaretskii , andrea_corallo@yahoo.it, Pip Cet , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159396187820747 (code B ref 42147); Sun, 05 Jul 2020 15:12:01 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 15:11:18 +0000 Received: from localhost ([127.0.0.1]:32887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js6IX-0005OY-Vw for submit@debbugs.gnu.org; Sun, 05 Jul 2020 11:11:18 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js6IV-0005OK-Aj for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 11:11:17 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B8D2D101582; Sun, 5 Jul 2020 11:11:09 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 74E1C1012BA; Sun, 5 Jul 2020 11:11:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593961863; bh=Ym48ZvgNjnDDN+0Vdt2UwiMD5E/Bp7H2/YaW1LXtJtk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=J4lsaiYnke1bCe3TXsT0Z+Muno3r3yoiYG3RSOmH05QmUToN9svyi4j186TIOmOo7 GzzW5+hFT+Fp+rBWtEsjo6EIDZV3oBidUCixtRiMCilIsQwMQKa99I0iz1LRCkYtm/ JN6xM800xBXZuU9KuMX+ie88JjpNynstTycPVnkdJUirbVG9dsD7Ampb3DYRcEZwUi 2h8CAfg+nTMWQJDfyxW+ySraGO5f3Qr4HJup430leo2bqmBbpO75el24/Lp86ur8VU QMZ4ccbL7VBBgNZm9UhefD2J4NYX6pZ81tmNhsv8DUVf56NZiCxth+VIrohMP1AEx1 nvu76LyH+OZ+g== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5E01A120422; Sun, 5 Jul 2020 11:11:02 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> <83lfjyu1mo.fsf@gnu.org> <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> Date: Sun, 05 Jul 2020 11:11:01 -0400 In-Reply-To: <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> (Paul Eggert's message of "Sun, 5 Jul 2020 01:28:46 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.032 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Since Emacs links to WebKit2GTK by default, I don't believe this is the case. Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 15:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159396280922240 (code B ref 42147); Sun, 05 Jul 2020 15:27:02 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 15:26:49 +0000 Received: from localhost ([127.0.0.1]:32897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js6XZ-0005me-Ja for submit@debbugs.gnu.org; Sun, 05 Jul 2020 11:26:49 -0400 Received: from mail203c50.megamailservers.eu ([91.136.10.213]:46614 helo=mail193c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js6XW-0005mS-O1 for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 11:26:48 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1593962796; bh=yjqGskVa9CIhkt9fipa1y/p+G0YBRVTt3KhqSs0S1+U=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=AM/ayH2qi2dqRLCnO74tjx0v1QPi/iv4COX9C7j90BO6cOp3PqYyoC/jnZLehQnFQ 4lPfU5grSzaBJFhBeV3pC+zxjE2goMEgojCXI/pX7r0uroIvaD7RxcJJulq6KYXyhb XjPR5eMSBW8kGv6KBMiaEDJfi5+sloMle+3x8lyY= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 065FQWkY011498; Sun, 5 Jul 2020 15:26:34 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Sun, 5 Jul 2020 17:26:32 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <58A8B462-8116-4E62-BF2C-0C86C098859F@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F25.5F01EC5A.000E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=cM2eTWWN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=90C1ltM161n2ID4NWfIA:9 a=CjuIK1q_8ugA:10 a=ENOmLqmOUNYA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 4 juli 2020 kl. 17.06 skrev Stefan Monnier : >=20 >> Thanks -- patch attached. Some expressions will still not be = constant-folded >> entirely; for example >=20 > LGTM, Thank you, pushed to master. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 15:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: mattiase@acm.org, Paul Eggert , andrea_corallo@yahoo.it, pipcet@gmail.com, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159396307822726 (code B ref 42147); Sun, 05 Jul 2020 15:32:02 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 15:31:18 +0000 Received: from localhost ([127.0.0.1]:32904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js6bu-0005uT-6J for submit@debbugs.gnu.org; Sun, 05 Jul 2020 11:31:18 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js6bs-0005uG-9a for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 11:31:16 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A0F4B80640; Sun, 5 Jul 2020 11:31:10 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4571180098; Sun, 5 Jul 2020 11:30:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1593963055; bh=OPaV2Ezd+yX9/eOmDKek3Y7jKYH0V9+eB9od6cLVNVE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=DqAbUp9m0HYfqTiesHmRZDySylULsascwSiEc1ycuKp1lOfKXKGr641ukc27wlNXA Tihy1aIRr3jMHIhgFLy9bnafwNJFSOrcfI5w6PNg/kAMZY3VrLDqgiR/qTpVk3VFOH A0n8xWjj6n19wTHiUCeMNSBvUfbaMJKfAUaJYARQ9xkfg5vbPUyLGl5TM8N3fEUnu5 5ORCt7uMK4Pzpfn5Lvly7q5nmeHDlPBpYtRDVtr+xW2oHNdXkQuGcWJcVB3XY3NXWU lG+pvnLxtubD3wwWJ3PmyTnj2lyCg/ag8qgd8bWAOhqGiNEQsyDFmJEAHRhdxSrO1G qapNwgIapb27A== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4321912093F; Sun, 5 Jul 2020 11:30:54 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> <83lfjyu1mo.fsf@gnu.org> <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> <83a70et3w1.fsf@gnu.org> Date: Sun, 05 Jul 2020 11:30:47 -0400 In-Reply-To: <83a70et3w1.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Jul 2020 17:47:42 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.024 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > That's not what I meant: I meant "non-standard" in the sense that the > compiler doesn't generate these instructions by default when dealing > with FP calculations. It depends on the architecture you generate for. It's clear that when that architecture is too old to include SSE2 instructions, GCC won't use SSE2 instructions (tho it still could at the cost of runtime tests for the presence of the feature). I don't know what GCC does if the target architecture is recent enough to include SSE2, but I'd expect it to then use SSE2 for most/all floating point operations since it generally leads to more efficient code (and it's easier for GCC to generate efficient code with it). >> I suspect they think x86 is on its way out and not worth worrying about. > Then why won't we do the same, and simply ignore the issue? Sounds good to me, Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 23:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: mattiase@acm.org, andrea_corallo@yahoo.it, Stefan Monnier , Pip Cet , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15939934714250 (code B ref 42147); Sun, 05 Jul 2020 23:58:02 +0000 Received: (at 42147) by debbugs.gnu.org; 5 Jul 2020 23:57:51 +0000 Received: from localhost ([127.0.0.1]:33114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsEW6-00016T-Tl for submit@debbugs.gnu.org; Sun, 05 Jul 2020 19:57:51 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:38002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsEW4-00016F-RO for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 19:57:50 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 88284160084; Sun, 5 Jul 2020 16:57:42 -0700 (PDT) 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 CFAztE9dhRny; Sun, 5 Jul 2020 16:57:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BE1B9160093; Sun, 5 Jul 2020 16:57:41 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 Q3p6i6Jw_2FW; Sun, 5 Jul 2020 16:57:41 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 73106160084; Sun, 5 Jul 2020 16:57:41 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MH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Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <39133030-b953-7245-9e68-e34a4939ddeb@cs.ucla.edu> Date: Sun, 5 Jul 2020 16:57:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/5/20 3:03 AM, Andrea Corallo wrote: > Wow I'm really surprised by this result! Are we doing so much floating > point while compiling Emacs? No, and you are right to be skeptical. I checked again, and unfortunately I originally measured the performance incorrectly, as I used a script that I had forgotten adds '-march=native' which makes the benchmark results not reflect what distros normally do (unless one is assuming something like Gentoo which is far less common). When I removed -march=native and stuck with just CC='gcc -m32' versus CC='gcc -m32 -msse2 -mfpmath=sse', the performance difference went the other way on my AMD Phenom II X4 910e (2010): the version generated with -msse2 -mfpmath=sse was 3.7% slower on the 'make compile-always' benchmark. I suppose it's possible both of these numbers are artifacts, though I don't know what would cause the artifacts. At any rate obviously I was wrong to suggest that -msse2 improves performance on this benchmark. Sorry about the noise. On 7/5/20 8:07 AM, Stefan Monnier wrote: > Could it be that your measurements also included the time spent > compiling C files and that GCC is significantly faster at generating > code for SSE2? I do a plain 'make' before running 'cd lisp; make compile-always' so GCC is not involved; it's mostly an Emacs byte-compiler benchmark. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 00:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: mattiase@acm.org, Eli Zaretskii , andrea_corallo@yahoo.it, Pip Cet , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15939942525539 (code B ref 42147); Mon, 06 Jul 2020 00:11:02 +0000 Received: (at 42147) by debbugs.gnu.org; 6 Jul 2020 00:10:52 +0000 Received: from localhost ([127.0.0.1]:33138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsEih-0001RH-Nc for submit@debbugs.gnu.org; Sun, 05 Jul 2020 20:10:51 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsEic-0001Qz-E0 for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 20:10:49 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id F1DA2160084; Sun, 5 Jul 2020 17:10:40 -0700 (PDT) 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 J2c6HcATRfyU; Sun, 5 Jul 2020 17:10:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 43E59160093; Sun, 5 Jul 2020 17:10:40 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 tn3JmxrmE1Nj; Sun, 5 Jul 2020 17:10:40 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 050EE160084; Sun, 5 Jul 2020 17:10:39 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> <83lfjyu1mo.fsf@gnu.org> <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsN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paGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <061b209d-0e66-acd3-8710-173a458e05df@cs.ucla.edu> Date: Sun, 5 Jul 2020 17:10:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/5/20 8:11 AM, Stefan Monnier wrote: >> Since Emacs links to WebKit2GTK by default, > I don't believe this is the case. Oh, you're right. I mistakenly assumed Fedora used a default configuration, ran "ldd /usr/bin/emacs", and saw libwebkit2gtk-4.0.so.37, so I thought WebKit2GTK was in by default. To get WebKit2GTK linked, one must configure Emacs with --with-xwidgets. Fedora does that, so their x86 Emacs would require SSE2 if they still supported x86. Which they do not - they dropped support for x86 in Fedora 31 (2019). From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 00:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier , Eli Zaretskii Cc: mattiase@acm.org, andrea_corallo@yahoo.it, pipcet@gmail.com, 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15939944525863 (code B ref 42147); Mon, 06 Jul 2020 00:15:01 +0000 Received: (at 42147) by debbugs.gnu.org; 6 Jul 2020 00:14:12 +0000 Received: from localhost ([127.0.0.1]:33143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsElw-0001WV-4k for submit@debbugs.gnu.org; Sun, 05 Jul 2020 20:14:12 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsElt-0001WI-Vq for 42147@debbugs.gnu.org; Sun, 05 Jul 2020 20:14:10 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id AC69E160084; Sun, 5 Jul 2020 17:14:04 -0700 (PDT) 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 8w7RasXtCMbq; Sun, 5 Jul 2020 17:14:03 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C7BDD160093; Sun, 5 Jul 2020 17:14:03 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 NUKog5IuxXhF; Sun, 5 Jul 2020 17:14:03 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4987C160084; Sun, 5 Jul 2020 17:14:03 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> <83lfjyu1mo.fsf@gnu.org> <4e6f253b-0771-e90d-a24e-4ce1bd5d3a2a@cs.ucla.edu> <83a70et3w1.fsf@gnu.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE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DRPMEdBNlZPRXJ5TzdRUkNDWWFoM294U0czOElBbk5laXdK WGdVOUJ6a2s4NVVHCmJQRWQ3SEdGL1ZTZUhDUXdXb3U2anFVRFRTRHZuOVloTlRkRzBLWFBN NzRhQyt4cjJab3cxTzJtaFhpaGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <9853d085-9cd6-8d3a-d657-7d0024737f4c@cs.ucla.edu> Date: Sun, 5 Jul 2020 17:14:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/5/20 8:30 AM, Stefan Monnier wrote: >>> I suspect they think x86 is on its way out and not worth worrying about. >> Then why won't we do the same, and simply ignore the issue? > Sounds good to me, Me too. I assume this means we needn't worry about the x86 rounding glitches, except perhaps to document them. So we can fold constant expressions involving floating point without worrying abouth these glitches. For sanity's sake, we should generate Emacs tarballs on a platform other than GNU/Linux x86, which is a pretty easy bit of advice to follow as hardly anybody runs that platform for software development nowadays. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 17:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: Paul Eggert , Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159405604115593 (code B ref 42147); Mon, 06 Jul 2020 17:21:01 +0000 Received: (at 42147) by debbugs.gnu.org; 6 Jul 2020 17:20:41 +0000 Received: from localhost ([127.0.0.1]:34799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsUnI-00043Q-T4 for submit@debbugs.gnu.org; Mon, 06 Jul 2020 13:20:41 -0400 Received: from mail224c50.megamailservers.eu ([91.136.10.234]:41904 helo=mail33c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsUnG-00043I-W3 for 42147@debbugs.gnu.org; Mon, 06 Jul 2020 13:20:40 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1594056027; bh=3KPnAgjVvzJQqLqDdyJ0wNXHKYKN3A8crd0BQ6vUzw8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=VNf19v8iZT0j11H8r6Eqgi/9bvnHW4NjgQWFIuO1Te6q7oU5UNwEupD/P9oveuJB3 fJjxV36R9wKvJpYkFAruSR177NhFRjiVWawp3OFimJKVeGJ5iFxLT7kJc8ETGMq+qZ cN8VgYnwwg2gf5x2CgMwa0KYJfdatva8/1M8iC24= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 066HKKUs002090; Mon, 6 Jul 2020 17:20:24 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 6 Jul 2020 19:20:20 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F24.5F035CD4.0009, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=eaJDgIMH c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=oX08kPI8AAAA:8 a=vozyyuf1xi-cqPRD_T4A:9 a=CjuIK1q_8ugA:10 a=HoS0eNqkKlFy34tK5QRU:22 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 5 juli 2020 kl. 15.16 skrev Andrea Corallo : > Absolutley, actually part of the scope of the patch in discussion (for > me) is exactly this given I'll just fetch this as a definition. Very good, it looks like we are all set then. I've pushed that patch and a follow-up that removes explicit optimisation functions that no longer are useful with the added pure functions. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 5 juli 2020 kl. 15.16 skrev Andrea Corallo : > Absolutley, actually part of the scope of the patch in discussion (for > me) is exactly this given I'll just fetch this as a definition. Very good, it looks like we are all set then. I've pushed that patch and = a follow-up that removes explicit optimisation functions that no longer = are useful with the added pure functions. Are you happy with this resolution, or is there anything else that needs = our attention? From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 21:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15940706007097 (code B ref 42147); Mon, 06 Jul 2020 21:24:02 +0000 Received: (at 42147) by debbugs.gnu.org; 6 Jul 2020 21:23:20 +0000 Received: from localhost ([127.0.0.1]:35018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsYa8-0001qP-00 for submit@debbugs.gnu.org; Mon, 06 Jul 2020 17:23:20 -0400 Received: from sonic308-18.consmr.mail.ir2.yahoo.com ([77.238.178.146]:45607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsYa3-0001q1-FE for 42147@debbugs.gnu.org; Mon, 06 Jul 2020 17:23:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1594070588; bh=+L0XbPVYHTVYfgAWKdHvd4PZ7EDt+wotvQcaKpUrb5E=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=XzIhgfpFWHRsFiftIBChWFJoogmO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BcSVRX5Ki 9f3vD5JjjZzCVctRWro0D1GtJSPVAI_TcitGkQVUoVBKghWVgibPuo2p7KJlI_KCB_u_qdYEczjf wXH_9yyNd0li3drTxQPpfBhnAnZ1lBW.B.2FA5soyPL1M23c0vND_bsv0n9Ch95QRjp0W49tKhiM miFkW3cWEAzjBSuk4SBbFQ94NUycP_7dphiDeYuTFEJ23Y0N4rbSi2hYrnFZD_LlxuzMKmZAvPuj QKHMOaYLIsceDkzUSzJNvRPjxzkpOy35FdHVLiMwRb.VnecTuQ5KmWq5LBc2FxS9sXmxrd9ziAHU 7PuTwam8CaLbjb9bi8762eq60eH2dKP1tDzpVzZkw4wj7Gf2WKRLmIP2BNwmf1PVwl_ZklfUt3RR u4YM0_QCUNdEElsDIBvJdmyTs70mtxmp0h9Wxv4CGt4ezDsPfxB1u5MoyFZlWDcj0xHmohl86iPn 04YyTnXcm7OUGyJ7cGvWMYzGa1bpyMTl9lY7xbl1Wt9SXDX15TzuDoMC5H3e.hH738CiUzbfv3rQ ldeKUNIosp3cpKBJjwo2L_xYmm6PbCypxGic9osfezGPml33GtkjkVwGY15qy0VcoIkUxG6whEQe yqfIXpzCLNnBGmFWZsqjamsUKAIg24E6F_RX8 Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ir2.yahoo.com with HTTP; Mon, 6 Jul 2020 21:23:08 +0000 Date: Mon, 6 Jul 2020 21:23:03 +0000 (UTC) From: Andrea Corallo Message-ID: <926674413.6042347.1594070583586@mail.yahoo.com> In-Reply-To: <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 809 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 5 juli 2020 kl. 15.16 skrev Andrea Corallo : > >> Absolutley, actually part of the scope of the patch in discussion (for >> me) is exactly this given I'll just fetch this as a definition. > > Very good, it looks like we are all set then. I've pushed that patch > and a follow-up that removes explicit optimisation functions that no > longer are useful with the added pure functions. Great, the branch I'm working on is already based on your commit therefore I was looking forward to see it on master. > Are you happy with this resolution, or is there anything else that needs = our attention? Yes I am happy :) Not sure about the floating point discussion originated from this but on my side this bug can be closed. Thanks =C2=A0 Andrea From unknown Tue Jun 17 22:26:58 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Andrea Corallo Subject: bug#42147: closed (Re: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations?) Message-ID: References: <1583748933.1069307.1593556032592@mail.yahoo.com> X-Gnu-PR-Message: they-closed 42147 X-Gnu-PR-Package: emacs Reply-To: 42147@debbugs.gnu.org Date: Tue, 07 Jul 2020 15:56:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1594137362-3072-1" This is a multi-part message in MIME format... ------------=_1594137362-3072-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #42147: 28.0.50; pure vs side-effect-free, missing optimizations? which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 42147@debbugs.gnu.org. --=20 42147: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D42147 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1594137362-3072-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 42147-done) by debbugs.gnu.org; 7 Jul 2020 15:55:22 +0000 Received: from localhost ([127.0.0.1]:36572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jspwH-0000ma-D1 for submit@debbugs.gnu.org; Tue, 07 Jul 2020 11:55:22 -0400 Received: from mail1463c50.megamailservers.eu ([91.136.14.63]:35088 helo=mail268c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jspwE-0000mG-Fz for 42147-done@debbugs.gnu.org; Tue, 07 Jul 2020 11:55:21 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1594137302; bh=UfHYv4fJ0v2lWKYIBXgIHYyKMmoURgOLvxr09YwcnSM=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=UUDAEIRgAlLa7qe+BLneutFklZZqhE5aMv12O5WqzIArF6tR8KQYaOugO4l3PXuT4 0NJyDu/9oz73EmIwcKcONv6wjrFTC/UGNhrR3WN1sa/IlgCVaRefmNPr9M3/pplwQb tmbWtAD9dS88ytMY9D+RLo2CDhxkXypfNvai4kt0= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 067Fsvb2029272; Tue, 7 Jul 2020 15:54:58 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: <926674413.6042347.1594070583586@mail.yahoo.com> Date: Tue, 7 Jul 2020 17:54:56 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> To: Andrea Corallo X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F16.5F049AD6.002E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=BZ+mLYl2 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=ER-AJWomcl0xNCVepSAA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 6 juli 2020 kl. 23.23 skrev Andrea Corallo : > Yes I am happy :) Not sure about the floating point discussion > originated from this but on my side this bug can be closed. Then closed it is. I would happily write something in NEWS but -- as Eli noted -- for any noticeable change in behaviour to occur, many conditions need to be met, several of which are quite unlikely. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 42147-done Cc: 42147-done@debbugs.gnu.org, Paul Eggert , Stefan Monnier , Andrea Corallo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 6 juli 2020 kl. 23.23 skrev Andrea Corallo : > Yes I am happy :) Not sure about the floating point discussion > originated from this but on my side this bug can be closed. Then closed it is. I would happily write something in NEWS but -- as Eli = noted -- for any noticeable change in behaviour to occur, many = conditions need to be met, several of which are quite unlikely. More improvements to the constant-folding are possible and desirable. = For example, I have a patch that deals with constant expressions in = let-bindings, so that (let ((x (+ 1 2))) (f x)) simplifies to (f 3), with the variable x removed. This in turn generates = more opportunities for further simplification and dead-code elimination. = Tell me if you are interested. ------------=_1594137362-3072-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Jun 2020 22:27:30 +0000 Received: from localhost ([127.0.0.1]:51916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqOiw-00007b-Hg for submit@debbugs.gnu.org; Tue, 30 Jun 2020 18:27:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:36872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqOiu-00007S-EO for submit@debbugs.gnu.org; Tue, 30 Jun 2020 18:27:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqOit-0000ye-Va for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 18:27:28 -0400 Received: from sonic309-25.consmr.mail.ir2.yahoo.com ([77.238.179.83]:37702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqOin-0003Ol-8t for bug-gnu-emacs@gnu.org; Tue, 30 Jun 2020 18:27:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1593556037; bh=0nDH+nZl3uzPCUOMC6U/qhHVimDHrYfCbfDGuY/pROk=; h=Date:From:To:Subject:References:From:Subject; b=RUtUZzo+QhQL/hZWHV1Lc8carDznK1BqR9QTxbeAE3PmWGUCEVIWClQdgmocg5qW2JtO3XyqBe9wVQzKfiBlXWJldptRqxCsHChfrTtznwQZGPrytWMnwdfNVUL390CXrs77BUUs3EeX1QumLrddfGQS43V/LwVOhbEaCi5gIHMjajZyWlzoyVd1yxgvmwor4vvqXECo3bMlVMp9/6Se2WSOq8T5txhKyQbdz4wFXyQTNpgToPa7wf1COv0hLXF/WRNaz3+VPVUcxQ5FbN0uxDf8TokzBexNd/MHTZz1rXQ8JW45on9pOXDTR5eC0inO254uILQq3WdkqR3g/d2Kxw== X-YMail-OSG: PrbI6W0VM1mqM8xRZh993rYHQq27Sv6VaE1fN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iVzetjJ Dgy03355NaGR0zv.qG1Ph2ZMBNANkqUG0rPcMX4JVsMfAKS8Be.A86u6Qke8AYGPj6v__mRGs3rn Cis2kEMu5Em5piOfx5y0YQ.SdMWh8bjy.OpxofaKmCzoZ9HbrcVdnQ7dLUNsGrPBZ9iOMkSVCFFb KxosxXTpCEKoIckboiWWTpcVkQorinB9Ma_1qo02UwV1adMoaZ2H8y.PxHvPmjs_rvhTfI7UI9WI whkLOzPBNwIKcblGDim.ZbTr6f6s- Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ir2.yahoo.com with HTTP; Tue, 30 Jun 2020 22:27:17 +0000 Date: Tue, 30 Jun 2020 22:27:12 +0000 (UTC) From: Andrea Corallo To: "bug-gnu-emacs@gnu.org" Message-ID: <1583748933.1069307.1593556032592@mail.yahoo.com> Subject: 28.0.50; pure vs side-effect-free, missing optimizations? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable References: <1583748933.1069307.1593556032592.ref@mail.yahoo.com> X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 801 Received-SPF: pass client-ip=77.238.179.83; envelope-from=andrea_corallo@yahoo.it; helo=sonic309-25.consmr.mail.ir2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/30 18:27:17 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Hi all, I was looking in byte-opt.el to how are classified a number of functions. My understanding is that pure functions should be technically a subset of side-effect-and-error-free for which the environment has no influence on the value the function evaluates to.=C2=A0 For this reason they can be constant folded in the compile time if possible. Now in pure functions I see we do not have a lot of functions that (to my understanding) would classify for that.=C2=A0 I'm thinking to simple predicates acting on immutable objects as consp or fixnump to give an example. Shouldn't we move these into the pure class? ATM for instance this does not get optimized: (defun foo () =C2=A0 (fixnump 3)) In case this makes sense I'll be happy to work on it and prepare a patch. Thanks =C2=A0 Andrea ------------=_1594137362-3072-1-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jul 2020 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 42147-done@debbugs.gnu.org, Paul Eggert , Stefan Monnier , Andrea Corallo Received: via spool by 42147-done@debbugs.gnu.org id=D42147.15941390966135 (code D ref 42147); Tue, 07 Jul 2020 16:25:02 +0000 Received: (at 42147-done) by debbugs.gnu.org; 7 Jul 2020 16:24:56 +0000 Received: from localhost ([127.0.0.1]:36614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsqOu-0001aq-0J for submit@debbugs.gnu.org; Tue, 07 Jul 2020 12:24:56 -0400 Received: from sonic306-20.consmr.mail.ir2.yahoo.com ([77.238.176.206]:36035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsqOc-0001aB-4Z for 42147-done@debbugs.gnu.org; Tue, 07 Jul 2020 12:24:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1594139071; bh=Q5wb/4Th9GKPdR21gHSSIqfHy0/l3ODiwJwFFNmbkcU=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=YYijX6Sjm+Za9ZT6aBI2sLV7TGg136pNxWi7zYKuvvUZ1XJejabmC1GdmKsXalrwuEsdKiwZKHAZ4HhbZavN044GTKbiyCEgNvHtaZVsJJ0A/wC7tkvv/fwjnHG95g+mjmA6mZxMrNIQoGTfZ0/WbQnsUBSf1tCBXRA/zL3SFrVZn7Ayu8GJIxoF5ZKElulfokbFwFSSMO/FddQb2MgYLluSOqqZdSacddgfuFseGBNKDTlU+fxPwZPoya7gtjhWdbJs06ixlxDgsufIZM2MIseaS6KZQxhMgpPWj1O8pbMkTuomC9JfiNnk2StR+evwTBST6lVc35tgtubX7If3+Q== X-YMail-OSG: bcvEBKQVM1ngeL8uy87OZuaFp8VRCSr2WZ0SRQ6fOKliAgLUtoB4tkv.gaYOLhh lgHB9qVvaxDFAGrVV.CBWP7F4oP2iFVrzDN8ea95gneLcy6DwDyjI74VWYjZXjoa5_WKu75CdEie r26nDvrcTsfddxWy8CF0qbBmE7LUZ6LBiNTZ0v1fXjecvW6YfVJqprDYFLIY4Rpa8l_nvtOLjYlr MdJ4wdCfY8dOk6GNQUYXGzDYeyTurE4seoxEWSWKoKpJbjaMl4ivyzeHmzNJEYsysXccIIlL8ms9 NuT6xPlwUpDMUojd_3LPPpN.T.QYfPYqF5QVqdWo.ekal6J69VvyX0N9KxzWNtM5xbBz430.HP5k M4u_7rr5_r7NiITr06b7DI5cxv_4lzVsC.roXipRpW9o9D9KlBF86lip40h3Iy_B_45HkHfj8wu. U1WfVLPjriMf1Qn9Z0RhDZ51_B7LcO00Y0T45wKNMqH5l11UwpfR4Xuigti6IU258jxcM1bOmkVp lh94g8sDiCLtUGN56eLywse5.Uo1sG8mqFoO0ZOVJgjVYhwRzHAbcDypuyGz30IjBvhYaWoVr31j hjxkSXfet_JzAA_9LD.2H7EtPH35Uhm7gCRizJjnTNevh25oB3Tg6A_sBVBBClaSA9f6mmEpBkUv 609gJj.gk5CVqqd54IZ7R_.KPJ0S2BLTN_B3LmB2UsfgY0YVzxT6D6VJWdhIeXXd9sm6BPzV1yoX PHl7uAV5mo9FSz6TSldVFRdWTmyS55Y6oebTtvvSANoP7W7kvnCP7CpQnL_XUzWZj.mod6biD_kQ 5vZbcoUcTaIirFGz_1zmp_awtuaFQl6qODAFjpqkPAjS2aBEVhU1zqcOVl.BzSaiomnplzUX_W3q IUQBiAKP05sj9AT.VJcze7Q_rqcu.YvgjOOSOSaBfjnAZ_63hozHKQPVwQ72q4T5Zm72emXm3icJ 91P9lsDqoyW_7uS4PoI6cooMN5t8ucxGHVZAX6AqYjHaB4h2XzIOqEJzhjgj0OHnddsSOjocFIaW bSX3_Mxaiw7iwFyNLEosbRW983YIF0DO0aztbrUZEZcUlevFIWrOwNvHaIs43jqLySoIAPzZO2fz HXwMK8dSLVlFWqKsOEOpxXecKqWqbC5XwKSSjCol9fySj4SVO7krDVq1AnzOQlI75Br6FqnDSWrA eECqUTzEylVDGTy_uDIJ59AciNfYwcZEwzg_GscupEqN5KJNayhURDchZXh.TpIntVm9kc7WbkSz KOykYRnB3Zc4fvWGbjwtQRbsIt7F_TnvH_KNGU5BfBRtD1xhsW7iOCV1ataP56FESLPa2l61Bux8 cB5nUnqRsgrc2aQ1yimSZg6U7nObeO_o- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Tue, 7 Jul 2020 16:24:31 +0000 Date: Tue, 7 Jul 2020 16:24:30 +0000 (UTC) From: Andrea Corallo Message-ID: <475381031.6812910.1594139070322@mail.yahoo.com> In-Reply-To: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 1010 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 6 juli 2020 kl. 23.23 skrev Andrea Corallo : > >> Yes I am happy :) Not sure about the floating point discussion >> originated from this but on my side this bug can be closed. > > Then closed it is. I would happily write something in NEWS but -- as > Eli noted -- for any noticeable change in behaviour to occur, many > conditions need to be met, several of which are quite unlikely. > > More improvements to the constant-folding are possible and desirable. For= example, I have a patch that deals with constant expressions in let-bindin= gs, so that > > (let ((x (+ 1 2))) >=C2=A0=C2=A0 (f x)) > > simplifies to (f 3), with the variable x removed. This in turn > generates more opportunities for further simplification and dead-code > elimination. Tell me if you are interested. Sure I'm.=C2=A0 The native compiler does it already but I'm curious to see how you do it at source level and how generic it is. Thanks =C2=A0 Andrea From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jul 2020 16:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: 42147-done@debbugs.gnu.org, Paul Eggert , Stefan Monnier , Andrea Corallo Received: via spool by 42147-done@debbugs.gnu.org id=D42147.15941409679345 (code D ref 42147); Tue, 07 Jul 2020 16:57:01 +0000 Received: (at 42147-done) by debbugs.gnu.org; 7 Jul 2020 16:56:07 +0000 Received: from localhost ([127.0.0.1]:36643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsqt5-0002Qf-GK for submit@debbugs.gnu.org; Tue, 07 Jul 2020 12:56:07 -0400 Received: from mail80c50.megamailservers.eu ([91.136.10.90]:57500 helo=mail70c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsqt2-0002QU-Hq for 42147-done@debbugs.gnu.org; Tue, 07 Jul 2020 12:56:06 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1594140952; bh=/OribfoKMMxTj8DjXKc8dJGWLCHp44aZqFTrE7y1xro=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=koU7MMqntjUvIb0lgnZj/9YAstQd/wUNKEZYrfa4SkXO/H7qfKPgrBF1nYvZVF3TJ gqvzqTr15064gTzkw3a+n8jUbX0GuYE+kiVc60sNKJk4drSHLA8EbSAgCkBUCnzii+ M4GkA7BkRssVbM9jXW4D1dxL+r112QV2LhxvgnLE= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail70c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 067GtdOj006811; Tue, 7 Jul 2020 16:55:41 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_088E5902-3449-4CC0-9EEA-22F13BAFCEEE" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Date: Tue, 7 Jul 2020 18:55:39 +0200 In-Reply-To: <475381031.6812910.1594139070322@mail.yahoo.com> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F21.5F04A917.0076, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OKBZIhSB c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=zPQN9lk3ysA_GdDB1ogA:9 a=CjuIK1q_8ugA:10 a=Q2kcLhgP3hmHiaRPxBUA:9 a=B2y7HmGcmWMA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 7 juli 2020 kl. 18.24 skrev Andrea Corallo : > Sure I'm. The native compiler does it already but I'm curious to see > how you do it at source level and how generic it is. Not very, but doing it at source level has some advantages since it can enable other source-level transformations. It's mainly a proof of concept -- for simplicity, it doesn't attempt to be overly cle [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_088E5902-3449-4CC0-9EEA-22F13BAFCEEE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 7 juli 2020 kl. 18.24 skrev Andrea Corallo : > Sure I'm. The native compiler does it already but I'm curious to see > how you do it at source level and how generic it is. Not very, but doing it at source level has some advantages since it can = enable other source-level transformations. It's mainly a proof of concept -- for simplicity, it doesn't attempt to = be overly clever in the face of loops or setq. One snag is that because Emacs inline functions (defsubst) are inlined = as bytecode, they are usually not amenable to source optimisations. It = is only when a defsubst is imported from a different .el file that has = not yet been byte-compiled that it is integrated as source, and then the = machinery in this patch will nicely propagate constant arguments into = the body. --Apple-Mail=_088E5902-3449-4CC0-9EEA-22F13BAFCEEE Content-Disposition: attachment; filename=0001-Constprop-of-lexical-variables.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Constprop-of-lexical-variables.patch" Content-Transfer-Encoding: quoted-printable =46rom=206ba3ec19de923250394f86fbbdb843f43f2f519a=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Sat,=2028=20Dec=202019=2021:11:56=20+0100=0A= Subject:=20[PATCH]=20Constprop=20of=20lexical=20variables=0A=0ALexical=20= variables=20bound=20to=20a=20constant=20value=20(symbol,=20number=20or=20= string)=0Aare=20substituted=20at=20their=20point=20of=20use=20and=20the=20= variable=20then=20eliminated=0Aif=20possible.=20=20Example:=0A=0A=20=20= (let=20((x=20(+=202=203)))=20(f=20x))=20=20=3D>=20=20(f=205)=0A=0AThis=20= reduces=20code=20size,=20eliminates=20stack=20operations,=20and=20= enables=0Afurther=20optimisations.=20=20The=20constprop=20mechanism=20is=20= generally=20afraid=20of=0Avariable=20mutation,=20conditions=20and=20= loops.=0A=0A*=20lisp/emacs-lisp/byte-opt.el=20= (byte-optimize-enable-constprop):=0AMaster=20switch=20for=20constprop=20= optimisations.=0A(byte-optimize--lexvars,=20= byte-optimize--vars-outside-condition)=0A= (byte-optimize--vars-outside-loop,=20byte-optimize--constprop-mode)=0A= (byte-optimize--dynamic-vars):=20New=20dynamic=20variables.=0A= (byte-optimize--substitutable-p,=20byte-optimize-let-form):=20New.=0A= (byte-optimize-form-code-walker):=20Adapt=20several=20clauses=20for=20= constprop,=0Aand=20add=20clauses=20for=20'setq'=20and=20'defvar'.=0A*=20= test/lisp/emacs-lisp/bytecomp-tests.el=20(bytecomp-test-var)=0A= (bytecomp-test-get-var,=20bytecomp-test-identity)=0A= (byte-opt-testsuite-arith-data):=20Add=20constprop=20test=20cases.=0A---=0A= =20lisp/emacs-lisp/byte-opt.el=20=20=20=20=20=20=20=20=20=20=20=20|=20= 299=20+++++++++++++++++++------=0A=20= test/lisp/emacs-lisp/bytecomp-tests.el=20|=20=2059=20+++++=0A=202=20= files=20changed,=20290=20insertions(+),=2068=20deletions(-)=0A=0Adiff=20= --git=20a/lisp/emacs-lisp/byte-opt.el=20b/lisp/emacs-lisp/byte-opt.el=0A= index=20194ceee176..a4a14410b9=20100644=0A---=20= a/lisp/emacs-lisp/byte-opt.el=0A+++=20b/lisp/emacs-lisp/byte-opt.el=0A@@=20= -366,6=20+366,48=20@@=20byte-compile-unfold-lambda=0A=20=0C=0A=20;;;=20= implementing=20source-level=20optimizers=0A=20=0A+(defconst=20= byte-optimize-enable-constprop=20t=0A+=20=20"If=20non-nil,=20enable=20= constant=20propagation=20optimisations.")=0A+=0A+(defvar=20= byte-optimize--lexvars=20nil=0A+=20=20"Lexical=20variables=20in=20scope,=20= in=20reverse=20order=20of=20declaration.=0A+Each=20element=20is=20on=20= the=20form=20(NAME=20CHANGED=20[VALUE]),=20where:=0A+=20=20NAME=20is=20= the=20variable=20name,=0A+=20=20CHANGED=20is=20a=20boolean=20indicating=20= whether=20it's=20been=20changed=20(with=20setq),=0A+=20=20VALUE,=20if=20= present,=20is=20a=20substitutable=20expression.=0A+Earlier=20variables=20= shadow=20later=20ones=20with=20the=20same=20name.=0A+Only=20lexical=20= variables=20are=20included.")=0A+=0A+(defvar=20= byte-optimize--vars-outside-condition=20nil=0A+=20=20"Alist=20of=20= variables=20lexically=20bound=20outside=20conditionally=20executed=20= code.")=0A+=0A+(defvar=20byte-optimize--vars-outside-loop=20nil=0A+=20=20= "Alist=20of=20variables=20lexically=20bound=20outside=20the=20innermost=20= `while'=20loop.")=0A+=0A+(defvar=20byte-optimize--constprop-mode=20t=0A+=20= =20"Constant-propagation=20mode:=20When=20t,=20constprop=20is=20always=0A= +enabled;=20when=20nil,=20disabled=20for=20variables=20bound=20outside=20= the=0A+innermost=20loop;=20when=20`loop',=20disabled=20for=20changed=20= variables=20bound=0A+outside=20the=20innermost=20loop.")=0A+=0A+(defvar=20= byte-optimize--dynamic-vars=20nil=0A+=20=20"List=20of=20variables=20= declared=20as=20dynamic=20during=20optimisation.")=0A+=0A+(defun=20= byte-optimize--substitutable-p=20(expr)=0A+=20=20"Whether=20EXPR=20is=20= a=20constant=20that=20can=20be=20propagated."=0A+=20=20;;=20Only=20= consider=20numbers,=20symbols=20and=20strings=20to=20be=20values=20for=20= substitution=0A+=20=20;;=20purposes.=20=20Numbers=20and=20symbols=20are=20= immutable,=20and=20mutating=20string=0A+=20=20;;=20literals=20(or=20= results=20from=20constant-evaluated=20string-returning=20functions)=0A+=20= =20;;=20can=20be=20considered=20undefined.=0A+=20=20;;=20(What=20about=20= other=20quoted=20values,=20like=20conses?)=0A+=20=20(or=20(booleanp=20= expr)=0A+=20=20=20=20=20=20(numberp=20expr)=0A+=20=20=20=20=20=20= (stringp=20expr)=0A+=20=20=20=20=20=20(and=20(consp=20expr)=0A+=20=20=20=20= =20=20=20=20=20=20=20(eq=20(car=20expr)=20'quote)=0A+=20=20=20=20=20=20=20= =20=20=20=20(symbolp=20(cadr=20expr)))=0A+=20=20=20=20=20=20(keywordp=20= expr)))=0A+=0A=20(defun=20byte-optimize-form-code-walker=20(form=20= for-effect)=0A=20=20=20;;=0A=20=20=20;;=20For=20normal=20function=20= calls,=20We=20can=20just=20mapcar=20the=20optimizer=20the=20cdr.=20=20= But=0A@@=20-377,11=20+419,22=20@@=20byte-optimize-form-code-walker=0A=20=20= =20(let=20((fn=20(car-safe=20form))=0A=20=09tmp)=0A=20=20=20=20=20(cond=20= ((not=20(consp=20form))=0A-=09=20=20=20(if=20(not=20(and=20for-effect=0A= -=09=09=09=20(or=20byte-compile-delete-errors=0A-=09=09=09=20=20=20=20=20= (not=20(symbolp=20form))=0A-=09=09=09=20=20=20=20=20(eq=20form=20t))))=0A= -=09=20=20=20=20=20form))=0A+=20=20=20=20=20=20=20=20=20=20=20(cond=0A+=20= =20=20=20=20=20=20=20=20=20=20=20((and=20for-effect=0A+=09=09=20=20(or=20= byte-compile-delete-errors=0A+=09=09=20=20=20=20=20=20(not=20(symbolp=20= form))=0A+=09=09=20=20=20=20=20=20(eq=20form=20t)))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20nil)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= ((symbolp=20form)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(let=20= ((lexvar=20(assq=20form=20byte-optimize--lexvars)))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(if=20(and=20(cddr=20lexvar)=20=20=20=20=20=20= ;=20Value=20available?=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(or=20(eq=20byte-optimize--constprop-mode=20t)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(not=20(assq=20form=20byte-optimize--vars-outside-loop))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(and=20(eq=20byte-optimize--constprop-mode=20'loop)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(not=20(cadr=20lexvar)))))=20=20;=20Variable=20unchanged?=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(caddr=20= lexvar)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20form)))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20(t=20form)))=0A=20=09=20=20((eq=20= fn=20'quote)=0A=20=09=20=20=20(if=20(cdr=20(cdr=20form))=0A=20=09=20=20=20= =20=20=20=20(byte-compile-warn=20"malformed=20quote=20form:=20`%s'"=0A@@=20= -402,29=20+455,19=20@@=20byte-optimize-form-code-walker=0A=20=09=20=20=20= ;;=20recursively=20enter=20the=20optimizer=20for=20the=20bindings=20and=20= body=0A=20=09=20=20=20;;=20of=20a=20let=20or=20let*.=20=20This=20for=20= depth-firstness:=20forms=20that=0A=20=09=20=20=20;;=20are=20more=20= deeply=20nested=20are=20optimized=20first.=0A-=09=20=20=20(cons=20fn=0A-=09= =20=20=20=20=20(cons=0A-=09=20=20=20=20=20=20(mapcar=20(lambda=20= (binding)=0A-=09=09=09=20(if=20(symbolp=20binding)=0A-=09=09=09=20=20=20=20= =20binding=0A-=09=09=09=20=20=20(if=20(cdr=20(cdr=20binding))=0A-=09=09=09= =20=20=20=20=20=20=20(byte-compile-warn=20"malformed=20let=20binding:=20= `%s'"=0A-=09=09=09=09=09=09=20=20(prin1-to-string=20binding)))=0A-=09=09=09= =20=20=20(list=20(car=20binding)=0A-=09=09=09=09=20(byte-optimize-form=20= (nth=201=20binding)=20nil))))=0A-=09=09=20=20=20=20=20=20(nth=201=20= form))=0A-=09=20=20=20=20=20=20(byte-optimize-body=20(cdr=20(cdr=20= form))=20for-effect))))=0A+=20=20=20=20=20=20=20=20=20=20=20(cons=20fn=20= (byte-optimize-let-form=20fn=20(cdr=20form)=20for-effect)))=0A=20=09=20=20= ((eq=20fn=20'cond)=0A-=09=20=20=20(cons=20fn=0A-=09=09=20(mapcar=20= (lambda=20(clause)=0A-=09=09=09=20=20=20=20(if=20(consp=20clause)=0A-=09=09= =09=09(cons=0A-=09=09=09=09=20(byte-optimize-form=20(car=20clause)=20= nil)=0A-=09=09=09=09=20(byte-optimize-body=20(cdr=20clause)=20= for-effect))=0A-=09=09=09=20=20=20=20=20=20(byte-compile-warn=20= "malformed=20cond=20form:=20`%s'"=0A-=09=09=09=09=09=09=20= (prin1-to-string=20clause))=0A-=09=09=09=20=20=20=20=20=20clause))=0A-=09= =09=09=20(cdr=20form))))=0A+=20=20=20=20=20=20=20=20=20=20=20(let=20= ((byte-optimize--vars-outside-condition=20byte-optimize--lexvars))=0A+=09= =20=20=20=20=20(cons=20fn=0A+=09=09=20=20=20(mapcar=20(lambda=20(clause)=0A= +=09=09=09=20=20=20=20=20(if=20(consp=20clause)=0A+=09=09=09=09=20(cons=0A= +=09=09=09=09=20=20(byte-optimize-form=20(car=20clause)=20nil)=0A+=09=09=09= =09=20=20(byte-optimize-body=20(cdr=20clause)=20for-effect))=0A+=09=09=09= =20=20=20=20=20=20=20(byte-compile-warn=20"malformed=20cond=20form:=20= `%s'"=0A+=09=09=09=09=09=09=20=20(prin1-to-string=20clause))=0A+=09=09=09= =20=20=20=20=20=20=20clause))=0A+=09=09=09=20=20=20(cdr=20form)))))=0A=20= =09=20=20((eq=20fn=20'progn)=0A=20=09=20=20=20;;=20As=20an=20extra=20= added=20bonus,=20this=20simplifies=20(progn=20)=20-->=20.=0A=20=09=20= =20=20(if=20(cdr=20(cdr=20form))=0A@@=20-456,36=20+499,54=20@@=20= byte-optimize-form-code-walker=0A=20=09=20=20=20=20=20(byte-compile-warn=20= "too=20few=20arguments=20for=20`if'"))=0A=20=09=20=20=20(cons=20fn=0A=20=09= =20=20=20=20=20(cons=20(byte-optimize-form=20(nth=201=20form)=20nil)=0A-=09= =20=20=20=20=20=20=20(cons=0A-=09=09(byte-optimize-form=20(nth=202=20= form)=20for-effect)=0A-=09=09(byte-optimize-body=20(nthcdr=203=20form)=20= for-effect)))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(let=20((byte-optimize--vars-outside-condition=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= byte-optimize--lexvars))=0A+=09=20=20=20=20=20=20=20=20=20=20=20=20=20= (cons=0A+=09=09=20=20=20=20=20=20(byte-optimize-form=20(nth=202=20form)=20= for-effect)=0A+=09=09=20=20=20=20=20=20(byte-optimize-body=20(nthcdr=203=20= form)=20for-effect))))))=0A=20=0A=20=09=20=20((memq=20fn=20'(and=20or))=20= =20;=20Remember,=20and/or=20are=20control=20structures.=0A-=09=20=20=20= ;;=20Take=20forms=20off=20the=20back=20until=20we=20can't=20any=20more.=0A= -=09=20=20=20;;=20In=20the=20future=20it=20could=20conceivably=20be=20a=20= problem=20that=20the=0A-=09=20=20=20;;=20subexpressions=20of=20these=20= forms=20are=20optimized=20in=20the=20reverse=0A-=09=20=20=20;;=20order,=20= but=20it's=20ok=20for=20now.=0A-=09=20=20=20(if=20for-effect=0A-=09=20=20= =20=20=20=20=20(let=20((backwards=20(reverse=20(cdr=20form))))=0A-=09=09=20= (while=20(and=20backwards=0A-=09=09=09=20=20=20=20=20(null=20(setcar=20= backwards=0A-=09=09=09=09=09=20=20=20(byte-optimize-form=20(car=20= backwards)=0A-=09=09=09=09=09=09=09=20=20=20=20=20=20=20for-effect))))=0A= -=09=09=20=20=20(setq=20backwards=20(cdr=20backwards)))=0A-=09=09=20(if=20= (and=20(cdr=20form)=20(null=20backwards))=0A-=09=09=20=20=20=20=20= (byte-compile-log=0A-=09=09=20=20=20=20=20=20"=20=20all=20subforms=20of=20= %s=20called=20for=20effect;=20deleted"=20form))=0A-=09=09=20(and=20= backwards=0A-=09=09=20=20=20=20=20=20(cons=20fn=20(nreverse=20(mapcar=20= 'byte-optimize-form=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20backwards)))))=0A-=09=20=20=20=20=20(cons=20fn=20= (mapcar=20'byte-optimize-form=20(cdr=20form)))))=0A-=0A-=09=20=20((eq=20= fn=20'while)=0A-=20=20=20=20=20=20=20=20=20=20=20(unless=20(consp=20(cdr=20= form))=0A-=09=20=20=20=20=20(byte-compile-warn=20"too=20few=20arguments=20= for=20`while'"))=0A-=20=20=20=20=20=20=20=20=20=20=20(cons=20fn=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20(byte-optimize-form=20= (cadr=20form)=20nil)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(byte-optimize-body=20(cddr=20form)=20t))))=0A+=20=20=20= =20=20=20=20=20=20=20=20;;=20We=20have=20to=20optimise=20in=20= left-to-right=20order,=20but=20doing=20so=0A+=20=20=20=20=20=20=20=20=20=20= =20;;=20we=20miss=20some=20optimisation=20opportunities:=20consider=0A+=20= =20=20=20=20=20=20=20=20=20=20;;=20(and=20A=20B)=20in=20a=20for-effect=20= context,=20where=20B=20=3D>=20nil.=0A+=20=20=20=20=20=20=20=20=20=20=20= ;;=20Then=20A=20could=20be=20optimised=20in=20a=20for-effect=20context=20= too.=0A+=20=20=20=20=20=20=20=20=20=20=20(let=20((tail=20(cdr=20form))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(args=20nil))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20(when=20tail=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20;;=20The=20first=20argument=20is=20always=20= unconditional.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(push=20= (byte-optimize-form=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(car=20tail)=20(and=20for-effect=20(null=20(cdr=20= tail))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= args)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setq=20tail=20= (cdr=20tail))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20= Remaining=20arguments=20are=20conditional.=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(let=20((byte-optimize--vars-outside-condition=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= byte-optimize--lexvars))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(while=20tail=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(push=20(byte-optimize-form=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(car=20tail)=20(and=20= for-effect=20(null=20(cdr=20tail))))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20args)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(setq=20tail=20(cdr=20tail)))))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20(cons=20fn=20(nreverse=20args))))=0A+=0A= +=20=20=20=20=20=20=20=20=20=20((eq=20fn=20'while)=0A+=20=20=20=20=20=20=20= =20=20=20=20(let=20((byte-optimize--vars-outside-condition=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20byte-optimize--lexvars)=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (byte-optimize--vars-outside-loop=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20byte-optimize--lexvars))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20;;=20Traverse=20the=20loop=20twice:=20first=20without=20any=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20constprop,=20to=20detect=20= setq=20forms...=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(let=20((opt=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(let=20= ((byte-optimize--constprop-mode=20nil))=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(cons=20(byte-optimize-form=20(nth=20= 1=20form)=20nil)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(byte-optimize-body=20(nthcdr=202=20form)=20= t)))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20...=20then=20= in=20loop=20mode,=20allowing=20substitution=20of=20variables=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20;;=20bound=20inside=20all=20loops=20= or=20not=20changed=20anywhere.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20;;=20This=20is=20a=20bit=20slow=20(exponential=20in=20the=20number=20= of=20nested=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20loops).=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(let=20= ((byte-optimize--constprop-mode=20'loop))=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(cons=20fn=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(cons=20(byte-optimize-form=20(car=20opt)=20= nil)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(byte-optimize-body=20(cdr=20opt)=20t)))))))=0A=20=0A= =20=09=20=20((eq=20fn=20'interactive)=0A=20=09=20=20=20= (byte-compile-warn=20"misplaced=20interactive=20spec:=20`%s'"=0A@@=20= -498,12=20+559,14=20@@=20byte-optimize-form-code-walker=0A=20=09=20=20=20= form)=0A=20=0A=20=09=20=20((eq=20fn=20'condition-case)=0A-=20=20=20=20=20= =20=20=20=20=20=20`(condition-case=20,(nth=201=20form)=20;Not=20= evaluated.=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,(byte-optimize-form=20(nth=202=20form)=20for-effect)=0A-=20=20=20=20=20=20= =20=20=20=20=20=20=20=20,@(mapcar=20(lambda=20(clause)=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20`(,(car=20= clause)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20,@(byte-optimize-body=20(cdr=20clause)=20= for-effect)))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(nthcdr=203=20form))))=0A+=20=20=20=20=20=20=20=20=20=20=20= (let=20((byte-optimize--vars-outside-condition=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20byte-optimize--lexvars))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20`(condition-case=20,(nth=201=20form)=20;Not=20= evaluated.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ,(byte-optimize-form=20(nth=202=20form)=20for-effect)=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20,@(mapcar=20(lambda=20(clause)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= `(,(car=20clause)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20,@(byte-optimize-body=20(cdr=20= clause)=20for-effect)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(nthcdr=203=20form)))))=0A=20=0A=20=09=20=20= ((eq=20fn=20'unwind-protect)=0A=20=09=20=20=20;;=20the=20"protected"=20= part=20of=20an=20unwind-protect=20is=20compiled=20(and=20thus=0A@@=20= -511,14=20+574,21=20@@=20byte-optimize-form-code-walker=0A=20=09=20=20=20= ;;=20non-protected=20part=20has=20the=20same=20for-effect=20status=20as=20= the=0A=20=09=20=20=20;;=20unwind-protect=20itself.=20=20(The=20protected=20= part=20is=20always=20for=20effect,=0A=20=09=20=20=20;;=20but=20that=20= isn't=20handled=20properly=20yet.)=0A-=09=20=20=20(cons=20fn=0A-=09=09=20= (cons=20(byte-optimize-form=20(nth=201=20form)=20for-effect)=0A-=09=09=20= =20=20=20=20=20=20(cdr=20(cdr=20form)))))=0A+=20=20=20=20=20=20=20=20=20=20= =20(let*=20((byte-optimize--vars-outside-condition=20= byte-optimize--lexvars)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(bodyform=20(byte-optimize-form=20(nth=201=20form)=20for-effect)))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20(cons=20fn=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(cons=20bodyform=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(pcase=20(cddr=20= form)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(`(:fun-body=20,f)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(list=20:fun-body=20= (byte-optimize-form=20f=20nil)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(unwindforms=20= unwindforms))))))=0A=20=0A=20=09=20=20((eq=20fn=20'catch)=0A-=09=20=20=20= (cons=20fn=0A-=09=09=20(cons=20(byte-optimize-form=20(nth=201=20form)=20= nil)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(byte-optimize-body=20(cdr=20form)=20for-effect))))=0A+=20=20=20=20=20= =20=20=20=20=20=20(let=20((byte-optimize--vars-outside-condition=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20byte-optimize--lexvars))=0A= +=09=20=20=20=20=20(cons=20fn=0A+=09=09=20=20=20(cons=20= (byte-optimize-form=20(nth=201=20form)=20nil)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(byte-optimize-body=20= (cdr=20form)=20for-effect)))))=0A=20=0A=20=09=20=20((eq=20fn=20'ignore)=0A= =20=09=20=20=20;;=20Don't=20treat=20the=20args=20to=20`ignore'=20as=20= being=0A@@=20-528,7=20+598,45=20@@=20byte-optimize-form-code-walker=0A=20= =09=20=20=20`(prog1=20nil=20.=20,(mapcar=20'byte-optimize-form=20(cdr=20= form))))=0A=20=0A=20=20=20=20=20=20=20=20=20=20=20;;=20Needed=20as=20= long=20as=20we=20run=20byte-optimize-form=20after=20cconv.=0A-=20=20=20=20= =20=20=20=20=20=20((eq=20fn=20'internal-make-closure)=20form)=0A+=20=20=20= =20=20=20=20=20=20=20((eq=20fn=20'internal-make-closure)=0A+=20=20=20=20=20= =20=20=20=20=20=20;;=20Look=20up=20free=20vars=20and=20mark=20them=20as=20= changed,=20so=20that=20they=0A+=20=20=20=20=20=20=20=20=20=20=20;;=20= won't=20be=20optimised=20away.=0A+=20=20=20=20=20=20=20=20=20=20=20= (dolist=20(var=20(caddr=20form))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= (let=20((lexvar=20(assq=20var=20byte-optimize--lexvars)))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(when=20lexvar=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(setcar=20(cdr=20lexvar)=20t))))=0A+=20=20=20=20= =20=20=20=20=20=20=20form)=0A+=0A+=20=20=20=20=20=20=20=20=20=20((eq=20= fn=20'setq)=0A+=20=20=20=20=20=20=20=20=20=20=20(let=20((args=20(cdr=20= form))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (var-expr-list=20nil))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(while=20= args=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(unless=20(and=20= (consp=20args)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(symbolp=20(car=20args))=20(consp=20(cdr=20= args)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (byte-compile-warn=20"malformed=20setq=20form:=20%S"=20form))=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(let*=20((var=20(car=20args))=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(expr=20= (cadr=20args))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(lexvar=20(assq=20var=20byte-optimize--lexvars))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(value=20= (byte-optimize-form=20expr=20nil)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(when=20lexvar=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20;;=20If=20it's=20bound=20outside=20conditional,=20= invalidate.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (if=20(assq=20var=20byte-optimize--vars-outside-condition)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20We=20are=20= in=20conditional=20code=20and=20the=20variable=20was=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20bound=20outside:=20= cancel=20substitutions.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(setcdr=20(cdr=20lexvar)=20nil)=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setcdr=20(cdr=20lexvar)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(and=20(byte-optimize--substitutable-p=20value)=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(list=20value))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(setcar=20(cdr=20lexvar)=20t))=20=20=20;=20Mark=20= variable=20as=20changed.=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(push=20var=20var-expr-list)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(push=20value=20var-expr-list))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(setq=20args=20(cddr=20args)))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20(cons=20fn=20(nreverse=20var-expr-list))))=0A+=0A+=20= =20=20=20=20=20=20=20=20=20((eq=20fn=20'defvar)=0A+=20=20=20=20=20=20=20=20= =20=20=20(when=20(and=20(>=3D=20(length=20form)=202)=20(symbolp=20(cadr=20= form)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(push=20(cadr=20form)=20= byte-optimize--dynamic-vars))=0A+=20=20=20=20=20=20=20=20=20=20=20form)=0A= =20=0A=20=20=20=20=20=20=20=20=20=20=20((byte-code-function-p=20fn)=0A=20= =20=20=20=20=20=20=20=20=20=20=20(cons=20fn=20(mapcar=20= #'byte-optimize-form=20(cdr=20form))))=0A@@=20-563,6=20+671,60=20@@=20= byte-optimize-form-code-walker=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(error=20(cons=20fn=20args))))=0A=20=09=20=20=20=20= =20=20=20(cons=20fn=20args)))))))=0A=20=0A+(defun=20= byte-optimize-let-form=20(head=20form=20for-effect)=0A+=20=20(if=20(and=20= lexical-binding=20byte-optimize-enable-constprop)=0A+=20=20=20=20=20=20= (let*=20((byte-optimize--lexvars=20byte-optimize--lexvars)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20(new-lexvars=20nil)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20(let-vars=20nil))=0A+=20=20=20=20=20=20=20=20(dolist=20= (binding=20(car=20form))=0A+=20=20=20=20=20=20=20=20=20=20(let*=20((name=20= (cond=20((consp=20binding)=20(car=20binding))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20((symbolp=20= binding)=20binding)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(t=0A+=09=09=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(byte-compile-warn=20"malformed=20let=20binding:=20`%S'"=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= binding))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(expr=20= (and=20(consp=20binding)=20(consp=20(cdr=20binding))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (byte-optimize-form=20(cadr=20binding)=20nil)))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(value=20(and=20= (byte-optimize--substitutable-p=20expr)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(list=20expr)))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(lexical=20(not=20= (or=20(special-variable-p=20name)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (memq=20name=20byte-compile-bound-variables)=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(memq=20name=20byte-optimize--dynamic-vars))))=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(lexinfo=20(and=20lexical=20(cons=20name=20= (cons=20nil=20value)))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20(push=20= (cons=20name=20(cons=20expr=20(cdr=20lexinfo)))=20let-vars)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20(when=20lexinfo=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(push=20lexinfo=20(if=20(eq=20head=20'let*)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20byte-optimize--lexvars=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20new-lexvars)))))=0A+=20=20= =20=20=20=20=20=20(setq=20byte-optimize--lexvars=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(append=20new-lexvars=20byte-optimize--lexvars))=0A= +=20=20=20=20=20=20=20=20;;=20Walk=20the=20body=20expressions,=20which=20= may=20mutate=20some=20of=20the=20records,=0A+=20=20=20=20=20=20=20=20;;=20= and=20generate=20new=20bindings=20that=20exlude=20unused=20variables.=0A= +=20=20=20=20=20=20=20=20(let*=20((opt-body=20(byte-optimize-body=20(cdr=20= form)=20for-effect))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (bindings=20nil))=0A+=20=20=20=20=20=20=20=20=20=20(dolist=20(var=20= let-vars)=0A+=20=20=20=20=20=20=20=20=20=20=20=20;;=20VAR=20is=20(NAME=20= EXPR=20[CHANGED=20[VALUE]])=0A+=20=20=20=20=20=20=20=20=20=20=20=20(if=20= (and=20(nthcdr=203=20var)=20(not=20(nth=202=20var))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= byte-optimize--constprop-mode)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(when=20nil=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20;;=20This=20warning=20makes=20the=20compiler=20very=20chatty,=20but=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20it=20does=20= find=20the=20occasional=20mistake.=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(byte-compile-warn=20"eliminating=20local=20variable=20= %S"=20(car=20var)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(push=20= (list=20(nth=200=20var)=20(nth=201=20var))=20bindings)))=0A+=20=20=20=20=20= =20=20=20=20=20(cons=20bindings=20opt-body)))=0A+=0A+=20=20=20=20;;=20= With=20dynamic=20binding,=20no=20substitutions=20are=20in=20effect.=0A+=20= =20=20=20(let=20((byte-optimize--lexvars=20nil))=0A+=20=20=20=20=20=20= (cons=0A+=20=20=20=20=20=20=20(mapcar=20(lambda=20(binding)=0A+=09=20=20=20= =20=20=20=20=20=20(if=20(symbolp=20binding)=0A+=09=09=20=20=20=20=20= binding=0A+=09=20=20=20=20=20=20=20=20=20=20=20(when=20(or=20(atom=20= binding)=20(cddr=20binding))=0A+=09=09=20=20=20=20=20(byte-compile-warn=20= "malformed=20let=20binding:=20`%S'"=20binding))=0A+=09=20=20=20=20=20=20=20= =20=20=20=20(list=20(car=20binding)=0A+=09=09=20=20=20=20=20=20=20=20=20= (byte-optimize-form=20(nth=201=20binding)=20nil))))=0A+=09=20=20=20=20=20= =20=20(car=20form))=0A+=20=20=20=20=20=20=20(byte-optimize-body=20(cdr=20= form)=20for-effect)))))=0A+=0A=20(defun=20byte-optimize-all-constp=20= (list)=0A=20=20=20"Non-nil=20if=20all=20elements=20of=20LIST=20satisfy=20= `macroexp-const-p'."=0A=20=20=20(let=20((constant=20t))=0A@@=20-607,6=20= +769,7=20@@=20byte-optimize-body=0A=20=20=20;;=20all-for-effect=20is=20= true.=20=20returns=20a=20new=20list=20of=20forms.=0A=20=20=20(let=20= ((rest=20forms)=0A=20=09(result=20nil)=0A+=20=20=20=20=20=20=20=20= (byte-optimize--dynamic-vars=20byte-optimize--dynamic-vars)=0A=20=09fe=20= new)=0A=20=20=20=20=20(while=20rest=0A=20=20=20=20=20=20=20(setq=20fe=20= (or=20all-for-effect=20(cdr=20rest)))=0Adiff=20--git=20= a/test/lisp/emacs-lisp/bytecomp-tests.el=20= b/test/lisp/emacs-lisp/bytecomp-tests.el=0Aindex=20= c235dd43fc..07320cf921=20100644=0A---=20= a/test/lisp/emacs-lisp/bytecomp-tests.el=0A+++=20= b/test/lisp/emacs-lisp/bytecomp-tests.el=0A@@=20-31,6=20+31,15=20@@=0A=20= (require=20'bytecomp)=0A=20=0A=20;;;=20Code:=0A+(defvar=20= bytecomp-test-var=20nil)=0A+=0A+(defun=20bytecomp-test-get-var=20()=0A+=20= =20bytecomp-test-var)=0A+=0A+(defun=20bytecomp-test-identity=20(x)=0A+=20= =20"Identity,=20but=20hidden=20from=20some=20optimisations."=0A+=20=20x)=0A= +=0A=20(defconst=20byte-opt-testsuite-arith-data=0A=20=20=20'(=0A=20=20=20= =20=20;;=20some=20functional=20tests=0A@@=20-349,6=20+358,56=20@@=20= byte-opt-testsuite-arith-data=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= '((a=20c)=20(b=20c)=20(7=20c)=20(-3=20c)=20(nil=20nil)=20(t=20c)=20(q=20= c)=20(r=20c)=20(s=20c)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(t=20= c)=20(x=20"a")=20(x=20"c")=20(x=20c)=20(x=20d)=20(x=20e)))=0A=20=0A+=20=20= =20=20;;=20Constprop=20test=20cases=0A+=20=20=20=20(let=20((a=20'alpha)=20= (b=20(concat=20"be"=20"ta"))=20(c=20nil)=20(d=20t)=20(e=20:gamma)=0A+=20=20= =20=20=20=20=20=20=20=20(f=20'(delta=20epsilon)))=0A+=20=20=20=20=20=20= (list=20a=20b=20c=20d=20e=20f))=0A+=0A+=20=20=20=20(let=20((x=201)=20(y=20= (+=203=204)))=0A+=20=20=20=20=20=20(list=0A+=20=20=20=20=20=20=20(let=20= (q=20(y=20x)=20(z=20y))=0A+=20=20=20=20=20=20=20=20=20(if=20q=20x=20= (list=20x=20y=20z)))))=0A+=0A+=20=20=20=20(let*=20((x=203)=20(y=20(*=20x=20= 2))=20(x=20(1+=20y)))=0A+=20=20=20=20=20=20x)=0A+=0A+=20=20=20=20(let=20= ((x=201)=20(bytecomp-test-var=202)=20(y=203))=0A+=20=20=20=20=20=20(list=20= x=20bytecomp-test-var=20(bytecomp-get-test-var)=20y))=0A+=0A+=20=20=20=20= (progn=0A+=20=20=20=20=20=20(defvar=20d)=0A+=20=20=20=20=20=20(let=20((x=20= 'a)=20(y=20'b))=20(list=20x=20y)))=0A+=0A+=20=20=20=20(let=20((x=202))=0A= +=20=20=20=20=20=20(list=20x=20(setq=20x=2013)=20(setq=20x=20(*=20x=20= 2))=20x))=0A+=0A+=20=20=20=20(let=20((x=20'a)=20(y=20'b))=0A+=20=20=20=20= =20=20(setq=20y=20x=0A+=20=20=20=20=20=20=20=20=20=20=20=20x=20(cons=20= 'c=20y)=0A+=20=20=20=20=20=20=20=20=20=20=20=20y=20x)=0A+=20=20=20=20=20=20= (list=20x=20y))=0A+=0A+=20=20=20=20(let=20((x=203))=0A+=20=20=20=20=20=20= (let=20((y=20x)=20z)=0A+=20=20=20=20=20=20=20=20(setq=20x=205)=0A+=20=20=20= =20=20=20=20=20(setq=20y=20(+=20y=208))=0A+=20=20=20=20=20=20=20=20(setq=20= z=20(if=20(bytecomp-test-identity=20t)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(progn=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(setq=20x=20(+=20x=201))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(list=20x=20y))=0A+=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setq=20x=20(+=20x=20= 2))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(list=20x=20= y)))=0A+=20=20=20=20=20=20=20=20(list=20x=20y=20z)))=0A+=0A+=20=20=20=20= (let=20((i=201)=20(s=200)=20(x=2013))=0A+=20=20=20=20=20=20(while=20(<=20= i=205)=0A+=20=20=20=20=20=20=20=20(setq=20s=20(+=20s=20i))=0A+=20=20=20=20= =20=20=20=20(setq=20i=20(1+=20i)))=0A+=20=20=20=20=20=20(list=20s=20x=20= i))=0A+=0A+=20=20=20=20(let=20((x=202))=0A+=20=20=20=20=20=20(list=20(or=20= (bytecomp-identity=20'a)=20(setq=20x=203))=20x))=0A+=0A=20=20=20=20=20;;=20= `substring'=20bytecode=20generation=20(bug#39709).=0A=20=20=20=20=20= (substring=20"abcdef")=0A=20=20=20=20=20(substring=20"abcdef"=202)=0A--=20= =0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_088E5902-3449-4CC0-9EEA-22F13BAFCEEE-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jul 2020 17:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 42147-done@debbugs.gnu.org, Paul Eggert , Stefan Monnier , Andrea Corallo Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159414374713803 (code D ref 42147); Tue, 07 Jul 2020 17:43:02 +0000 Received: (at 42147-done) by debbugs.gnu.org; 7 Jul 2020 17:42:27 +0000 Received: from localhost ([127.0.0.1]:36670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsrbu-0003aZ-Un for submit@debbugs.gnu.org; Tue, 07 Jul 2020 13:42:27 -0400 Received: from sonic306-20.consmr.mail.ir2.yahoo.com ([77.238.176.206]:36473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsrbs-0003aG-Bf for 42147-done@debbugs.gnu.org; Tue, 07 Jul 2020 13:42:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s2048; t=1594143737; bh=4uTbgNqokE0V2NMBItCijrdxJUIAYdX1SMiGXizthdQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=WLvG9dZ8jJZ370E8vkMSNu0a/HJdpJ84CmOr92me4i+SAZIbZUr8DsA3alyirN5sNDdI2s9K8llugh/dbQAGuwUJivB4s5O+JNTfc5AucbtE+iZ4KlMf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Y 0uPNdrQOYv4oZma3NO3BeKYXO0sVUl_UIyH62XkiCLuib_aTUkfH6yfpNrUBxvq5VkIDuWYdFYv3 .iMecde5wMsSgLEEX1QP5PpGNWCTKQ4VFQQRpl10BMu.joq5PL3LSh46bDbav8NwPDTqdfFRSV_a 0fM3lBj7oB1A.DgGMsS4leEyLGEQPRSpRdcjiUXJ5HuM5.G_NxmeaRwRJRRNnN38WVsX9IuOaAhU qJxzJOW0pRlUEzOrCFRKU_zD77kU7nNgolSWb_ukUQ84tmuHOZAn1ig0Hx1YF3g0C1K.DO6sU6A4 2WOZcPS7yl2i8VsoigpMxhyCdqF6N.PxuikNY1NZXS_zfT5J6hNZckGFrZK9bs0bn6ZZ_SNDvNlm scBdRtSNhZTny6FanxWyhfJNl4DTpKbU0iPLTmVziOSBXn6JKF3uMJrtL_UzoOQcy7qrN4Vpkggs jQrh9xBNJ9ZkoYz8odfC_7SK_s_9.xE.Q3OezZH97tbnN4kUKjhZh6NRr2fdYMGyWlnc4QfIkzdl lWMrVSjDFvxl.qkoCF51N9nhOcLGMbQqjoOo- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Tue, 7 Jul 2020 17:42:17 +0000 Date: Tue, 7 Jul 2020 17:42:11 +0000 (UTC) From: Andrea Corallo Message-ID: <1332047176.6884733.1594143731905@mail.yahoo.com> In-Reply-To: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 Content-Length: 1126 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > 7 juli 2020 kl. 18.24 skrev Andrea Corallo : > >> Sure I'm.=C2=A0 The native compiler does it already but I'm curious to s= ee >> how you do it at source level and how generic it is. > > Not very, but doing it at source level has some advantages since it can e= nable other source-level transformations. > It's mainly a proof of concept -- for simplicity, it doesn't attempt to b= e overly clever in the face of loops or setq. > > One snag is that because Emacs inline functions (defsubst) are inlined > as bytecode, they are usually not amenable to source optimisations. It > is only when a defsubst is imported from a different .el file that has > not yet been byte-compiled that it is integrated as source, and then > the machinery in this patch will nicely propagate constant arguments > into the body. Well loops and setq without CFG IMO are likely to be difficult if not impossible to optimize in a generic way.=C2=A0 But I agree that having a simple optimization done earlier is always better given it can benefit other ones. =C2=A0 Andrea From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jul 2020 19:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 42147-done@debbugs.gnu.org, Paul Eggert , Stefan Monnier , Andrea Corallo Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159423571531401 (code D ref 42147); Wed, 08 Jul 2020 19:16:01 +0000 Received: (at 42147-done) by debbugs.gnu.org; 8 Jul 2020 19:15:15 +0000 Received: from localhost ([127.0.0.1]:39093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtFXH-0008AP-HE for submit@debbugs.gnu.org; Wed, 08 Jul 2020 15:15:15 -0400 Received: from mx.sdf.org ([205.166.94.24]:54822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtFXF-0008AG-Ae for 42147-done@debbugs.gnu.org; Wed, 08 Jul 2020 15:15:14 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 068JEhhS012766; Wed, 8 Jul 2020 19:14:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sdf.org; s=default; t=1594235688; bh=6QW+10OZS7F8+pJ1wit/yDY6QwdLbAP/b09qiB/1QHg=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=NQmAkt0dw4AmYQzWK1zJhUg1AvBHPkU7khRPVyo4hnu1d57O+nJ4VteS70io0CdZF dfZhBQUv9Tp7CvUUxIc4aJrzyqtP41zSvW6NmvKFo4mboEiEeSfO5vxoWmM61TEPxV 4cFfqPOya0CLJ3U71bxqc/xi+yvQAnSC4eAWTX5w= From: Andrea Corallo References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> Date: Wed, 08 Jul 2020 19:14:43 +0000 In-Reply-To: ("Mattias \=\?utf-8\?Q\?Engdeg\=C3\=A5rd\=22's\?\= message of "Tue, 7 Jul 2020 18:55:39 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > +(defun byte-optimize--substitutable-p (expr) > + "Whether EXPR is a constant that can be propagated." > + ;; Only consider numbers, symbols and strings to be values for substit= ution > + ;; purposes. Numbers and symbols are immutable, and mutating string > + ;; literals (or results from constant-evaluated string-returning funct= ions) > + ;; can be considered undefined. > + ;; (What about other quoted values, like conses?) > + (or (booleanp expr) > + (numberp expr) > + (stringp expr) > + (and (consp expr) > + (eq (car expr) 'quote) > + (symbolp (cadr expr))) > + (keywordp expr))) Hi Mattias, in the branch I'm working I've a function similar in scope to this so reading your patch this got my attention. In my version I assumed (after a look to the manual) to have strings to be immutable only at speed 3. Is it safe to assume this always instead? Also I wanted ask why symbols are not included but only keywords, is this to respect the side effect of interning them or something else? Thanks! Andrea --=20 akrl@sdf.org From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jul 2020 21:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: 42147-done@debbugs.gnu.org, Paul Eggert , Stefan Monnier , Andrea Corallo Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159424358111246 (code D ref 42147); Wed, 08 Jul 2020 21:27:02 +0000 Received: (at 42147-done) by debbugs.gnu.org; 8 Jul 2020 21:26:21 +0000 Received: from localhost ([127.0.0.1]:39230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtHa9-0002vK-4i for submit@debbugs.gnu.org; Wed, 08 Jul 2020 17:26:21 -0400 Received: from mail229c50.megamailservers.eu ([91.136.10.239]:58006 helo=mail36c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtHa5-0002vA-O4 for 42147-done@debbugs.gnu.org; Wed, 08 Jul 2020 17:26:19 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1594243566; bh=OcficJHeVm00KHmFD5HLeqO/sGSRs0RPa7G9mDLAp1U=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=gmKoE/xJbK/HFwvGCPulYk/UT5LsrZOiBtt13JqPJjBo6sQPu+wJsxEQg8I6XRYZ5 6REfzamYohi7Spr2B3XBIbIYv8odZLfL9IY3lJdd1FJXyQOjVz7LR3kumrTOqOAcKZ YJ0JHTTgupVqRGCE/cFvQ0+gdOmaAIHHdXDhI1qc= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 068LPwdX013732; Wed, 8 Jul 2020 21:26:03 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Wed, 8 Jul 2020 23:25:58 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F26.5F0639ED.006A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PeiBeRpd c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=0MsoZ9UDlHlg4oHg0PQA:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello Andrea, > In my version I assumed (after a look to the manual) to have strings to > be immutable only at speed 3. Is it safe to assume this always instead? Ultimately it depends on the transformations you do, but yes: this patch substitutes let-bound names for their values, and since the behaviour of mutating string literals is undefined, it's safe. Cons [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello Andrea, > In my version I assumed (after a look to the manual) to have strings = to > be immutable only at speed 3. Is it safe to assume this always = instead? Ultimately it depends on the transformations you do, but yes: this patch = substitutes let-bound names for their values, and since the behaviour of = mutating string literals is undefined, it's safe. Consider: (let ((s "abc")) (f s) s) It doesn't matter what 'f' does; since it isn't permitted to mutate its = argument string, the transformation to (progn (f "abc") "abc") is safe (assuming lexical binding, since f could otherwise set s to = something else). > Also I wanted ask why symbols are not included but only keywords, is > this to respect the side effect of interning them or something else? Symbols are included, but since this is (normalised) Lisp source, plain = symbols are variables; constants of symbol type are represented as = (quote SYM), matched by the and-expression. Keywords are just symbols = whose name begin with a colon, like :chocolate, and need no quoting. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jul 2020 22:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 42147-done@debbugs.gnu.org, Paul Eggert , Stefan Monnier , Andrea Corallo Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159424678316462 (code D ref 42147); Wed, 08 Jul 2020 22:20:02 +0000 Received: (at 42147-done) by debbugs.gnu.org; 8 Jul 2020 22:19:43 +0000 Received: from localhost ([127.0.0.1]:39361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtIPn-0004HS-7f for submit@debbugs.gnu.org; Wed, 08 Jul 2020 18:19:43 -0400 Received: from mx.sdf.org ([205.166.94.24]:54708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtIPl-0004HJ-FC for 42147-done@debbugs.gnu.org; Wed, 08 Jul 2020 18:19:42 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 068MJWch024242; Wed, 8 Jul 2020 22:19:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sdf.org; s=default; t=1594246775; bh=uBCcp8drLWLyYLoZqNZYanROzlAKcilKDVR9y+3H1e0=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=UlsSmSuI/pomek7jwib6OJsNX0vOUNV9giRj2m9h/dEKmKZNcpUkc2bgk8CpPouD1 kP4hHZcZra4rJ2ZY3aZU+hd8HXLNLisGj9ELIx9gxmg3J8uTZa/FcZcgRlnzmyihIC 6T94zAI5tUFAmYzXTaumQ95yNjK+BFuVx5cnRmS0= From: Andrea Corallo References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> Date: Wed, 08 Jul 2020 22:19:32 +0000 In-Reply-To: <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> ("Mattias \=\?utf-8\?Q\?Engdeg\=C3\=A5rd\=22's\?\= message of "Wed, 8 Jul 2020 23:25:58 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Mattias Engdeg=C3=A5rd writes: > Hello Andrea, > >> In my version I assumed (after a look to the manual) to have strings to >> be immutable only at speed 3. Is it safe to assume this always instead? > > Ultimately it depends on the transformations you do, but yes: this > patch substitutes let-bound names for their values, and since the > behaviour of mutating string literals is undefined, it's > safe. Consider: > > (let ((s "abc")) > (f s) > s) > > It doesn't matter what 'f' does; since it isn't permitted to mutate its a= rgument string, the transformation to > > (progn (f "abc") "abc") > > is safe (assuming lexical binding, since f could otherwise set s to somet= hing else). Understand, in your code this predicate is used for substitution therefore is just correct to substitute with the original object. In mine is governating the objects we can materialize with const folding so I had it a little stricter. But this raise to me another doubt on the topic that is: why don't we have the same in the byte-compiler? That is: (defun foo (x) (concat "bar" "foo")) is byte compiled optimizing on `concat' because pure. But doing that the resulting string "barfoo" becomes immutable. I'd expect "barfoo" to be mutable because without optimizations the allocation would be done in the run-time. In general how I imagined the thing is that we can optimize only pure functions returning immutable objects to avoid the risk of unexpectedly creating objects that should not be changed. Or is it maybe that the only way to certainly have a mutable string is with `copy-sequence' or `make-string'? >> Also I wanted ask why symbols are not included but only keywords, is >> this to respect the side effect of interning them or something else? > > Symbols are included, but since this is (normalised) Lisp source, > plain symbols are variables; constants of symbol type are represented > as (quote SYM), matched by the and-expression. Keywords are just > symbols whose name begin with a colon, like :chocolate, and need no > quoting. Understand It's a little late hope I'm not talking stupid, thanks for your patience. Andrea --=20 akrl@sdf.org From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jul 2020 10:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: 42147-done@debbugs.gnu.org, Paul Eggert , Stefan Monnier , Andrea Corallo Received: via spool by 42147-done@debbugs.gnu.org id=D42147.15942900713698 (code D ref 42147); Thu, 09 Jul 2020 10:22:01 +0000 Received: (at 42147-done) by debbugs.gnu.org; 9 Jul 2020 10:21:11 +0000 Received: from localhost ([127.0.0.1]:39975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtTfy-0000xZ-MA for submit@debbugs.gnu.org; Thu, 09 Jul 2020 06:21:10 -0400 Received: from mail1452c50.megamailservers.eu ([91.136.14.52]:39000 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtTfu-0000wg-Pr for 42147-done@debbugs.gnu.org; Thu, 09 Jul 2020 06:21:09 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1594290049; bh=DbGbJ5DDmGaaDDldr4gY9u3vBFVdGon9vCl0i665iPA=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=sauGxpUrsd4zwqoQRG5mT0e5IRPFpLOx2ZfaUdVzCn7ZcJTt5XR/ImF2L+8wGm/rq 6VhHqDkfIapYVxLT3OtkqkAUzNNrpwp0fWIp/MZlGIMDEkGUPAop4dzmxCr2o31g2A mACuDeboF5tfnzyT1j3TUfVzs3TE6HZc8yF+BChU= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 069AKejh008733; Thu, 9 Jul 2020 10:20:46 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Thu, 9 Jul 2020 12:20:34 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <4A6D5CD1-031E-4DF8-9FE5-365DF17E14CA@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F17.5F06EF81.0064, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=A5MSwJeG c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=oX08kPI8AAAA:8 a=yJ4EgYy2VQUyobU5FV4A:9 a=fVpxQXZP2W1u2YHm:21 a=HyK-AmsYuPH8IRny:21 a=CjuIK1q_8ugA:10 a=HoS0eNqkKlFy34tK5QRU:22 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 9 juli 2020 kl. 00.19 skrev Andrea Corallo : > Or is it maybe that the only way to certainly have a mutable string is > with `copy-sequence' or `make-string'? Yes; since the need for a mutable value is very unlikely, creating a fresh copy every time just in case would be a big waste of resources. Otherwise, we could only 'optimise' Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: megamailservers.eu] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 9 juli 2020 kl. 00.19 skrev Andrea Corallo : > Or is it maybe that the only way to certainly have a mutable string is > with `copy-sequence' or `make-string'? Yes; since the need for a mutable value is very unlikely, creating a = fresh copy every time just in case would be a big waste of resources. = Otherwise, we could only 'optimise' (concat "abc" "def") to (copy-sequence "abcdef") which would be a very modest improvement, for very little gain. The two functions you mentioned are indeed guaranteed to return fresh, = mutable strings and thus cannot be marked 'pure'. String mutation is something of a special case: it is rare, yet its mere = possibility incurs costs even for code that doesn't use it. Better try = to keep that cost to a minimum. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jul 2020 12:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: 42147-done@debbugs.gnu.org, Paul Eggert , Andrea Corallo , Andrea Corallo Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159429883525724 (code D ref 42147); Thu, 09 Jul 2020 12:48:01 +0000 Received: (at 42147-done) by debbugs.gnu.org; 9 Jul 2020 12:47:15 +0000 Received: from localhost ([127.0.0.1]:40203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtVxL-0006gq-L9 for submit@debbugs.gnu.org; Thu, 09 Jul 2020 08:47:15 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:30323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtVxJ-0006gb-Hk for 42147-done@debbugs.gnu.org; Thu, 09 Jul 2020 08:47:13 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 97B9580C96; Thu, 9 Jul 2020 08:47:07 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id F20AE80292; Thu, 9 Jul 2020 08:47:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1594298825; bh=Vp2zviKeldECHvu2nVXpt7+4AAZzfeyezVB3D0Q+aAI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=eWxZOJtvO6ENxnS9Su+eQVm2fPUIcM/9bxN7mzixx65XRNOSLRzd0lPW30eKGMdFf 7ymuG48MMivonqfJkNiYJyCk/HRtD2VaKtIEjXkOWf/y615qI7/YLZ4gNS6uDPlzAS iLoeJqa7HLVeFiYYEvc/KP4QPL6MoWpOZ6vhZDoRWmHbbSRv65w8hyr2Z1voRf6fOm IP1DMmFqON1+MUCOf60fvBFjc12NzJMfhM2rXHi5LAKiMoBhGkTp6TvoEnMFvKmG62 Pe7HsHFuOu3qDBJZtrhp5aucmt/3+mJVisUR0Zpaf+e44mv+8y++k8sMYqZDQxb8UF FFtBEaRn/CrJQ== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8957D12081B; Thu, 9 Jul 2020 08:47:05 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> <4A6D5CD1-031E-4DF8-9FE5-365DF17E14CA@acm.org> Date: Thu, 09 Jul 2020 08:47:03 -0400 In-Reply-To: <4A6D5CD1-031E-4DF8-9FE5-365DF17E14CA@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Thu, 9 Jul 2020 12:20:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.024 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > String mutation is something of a special case: it is rare, yet its mere > possibility incurs costs even for code that doesn't use it. Yes and no: it's *very* rare to change the sequence of characters which compose a string, yes, but until the addition of `propertize` (in Emacs-21) mutation was the only way to add text-properties to a string, so it's still quite common. Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jul 2020 12:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147-done@debbugs.gnu.org Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159429944626602 (code D ref 42147); Thu, 09 Jul 2020 12:58:02 +0000 Received: (at 42147-done) by debbugs.gnu.org; 9 Jul 2020 12:57:26 +0000 Received: from localhost ([127.0.0.1]:40219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtW7C-0006v0-19 for submit@debbugs.gnu.org; Thu, 09 Jul 2020 08:57:26 -0400 Received: from mx.sdf.org ([205.166.94.24]:64595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtW7B-0006us-1y for 42147-done@debbugs.gnu.org; Thu, 09 Jul 2020 08:57:25 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 069CvF7F008410; Thu, 9 Jul 2020 12:57:16 GMT From: Andrea Corallo References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> <4A6D5CD1-031E-4DF8-9FE5-365DF17E14CA@acm.org> Date: Thu, 09 Jul 2020 12:57:15 +0000 In-Reply-To: (Stefan Monnier's message of "Thu, 09 Jul 2020 08:47:03 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> String mutation is something of a special case: it is rare, yet its mere >> possibility incurs costs even for code that doesn't use it. > > Yes and no: it's *very* rare to change the sequence of characters which > compose a string, yes, but until the addition of `propertize` (in > Emacs-21) mutation was the only way to add text-properties to a string, > so it's still quite common. Hi Stefan, What's your suggestion on this optimization? Do you think can be on with default settings or is it dangerous? Andrea -- akrl@sdf.org From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jul 2020 14:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147-done@debbugs.gnu.org Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159430536312648 (code D ref 42147); Thu, 09 Jul 2020 14:37:02 +0000 Received: (at 42147-done) by debbugs.gnu.org; 9 Jul 2020 14:36:03 +0000 Received: from localhost ([127.0.0.1]:41454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtXed-0003Hw-CY for submit@debbugs.gnu.org; Thu, 09 Jul 2020 10:36:03 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtXeZ-0003HQ-LM for 42147-done@debbugs.gnu.org; Thu, 09 Jul 2020 10:36:02 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1E9F1100ED1; Thu, 9 Jul 2020 10:35:54 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7EC07100659; Thu, 9 Jul 2020 10:35:52 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1594305352; bh=dyGHvguT3i3uh/77gVTs8GNSwOe346cNFxNJauSf57s=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=f41JHbYoOzJ9AGIEeDy6m+Evno2XR9/7l3U6i7tXH0P3dh3QUeK7wuNXqXQIqKIPq 4B8vcrdUvWkmXRl4qeUAozE5tRCY68VgOVktQ1UtXixn43Vw8HkiJN2NVWOUwM55wd H8yEHLcqonr+MHIt+KEwCZdHCWT5UYyq/t7g3wYTV7oAUmkYeVt4/r1vmdUEPXkh9f fq8PfZOJKSh2KHdM2tQPgRl7WbX2xtubXaN9M24bBIskCmD+q7+myEaLYZo0l99f+D 9vV5anM9cq1PDnKkJRLpa342pjhnmpNPzSmb5qZ5wQ6N41slg1mgXISYGuu+UC70DV CZD7+86j5R/wQ== Received: from alfajor (unknown [157.52.0.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0E49712085F; Thu, 9 Jul 2020 10:35:52 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> <4A6D5CD1-031E-4DF8-9FE5-365DF17E14CA@acm.org> Date: Thu, 09 Jul 2020 10:35:51 -0400 In-Reply-To: (Andrea Corallo's message of "Thu, 09 Jul 2020 12:57:15 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.038 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > What's your suggestion on this optimization? Do you think can be on with > default settings or is it dangerous? AFAICT it's been on since Emacs-21, which seems to argue for "not too dangerous". Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jul 2020 15:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier , Andrea Corallo Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Andrea Corallo , 42147-done@debbugs.gnu.org Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159430797424840 (code D ref 42147); Thu, 09 Jul 2020 15:20:02 +0000 Received: (at 42147-done) by debbugs.gnu.org; 9 Jul 2020 15:19:34 +0000 Received: from localhost ([127.0.0.1]:41476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtYKj-0006Sa-M8 for submit@debbugs.gnu.org; Thu, 09 Jul 2020 11:19:33 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtYKg-0006SM-U1 for 42147-done@debbugs.gnu.org; Thu, 09 Jul 2020 11:19:32 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DEF061600C3; Thu, 9 Jul 2020 08:19:24 -0700 (PDT) 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 IRKgQsrMQ4Eu; Thu, 9 Jul 2020 08:19:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3B3621600C4; Thu, 9 Jul 2020 08:19:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu 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 pdy5JngNzjT7; Thu, 9 Jul 2020 08:19:24 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0813D1600C3; Thu, 9 Jul 2020 08:19:24 -0700 (PDT) References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> <4A6D5CD1-031E-4DF8-9FE5-365DF17E14CA@acm.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hG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TVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: Date: Thu, 9 Jul 2020 08:19:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 7/9/20 7:35 AM, Stefan Monnier wrote: > AFAICT it's been on since Emacs-21, which seems to argue for "not too dangerous". I feel the same way. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jul 2020 15:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147-done@debbugs.gnu.org Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159430908926563 (code D ref 42147); Thu, 09 Jul 2020 15:39:01 +0000 Received: (at 42147-done) by debbugs.gnu.org; 9 Jul 2020 15:38:09 +0000 Received: from localhost ([127.0.0.1]:41496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtYcj-0006uN-5T for submit@debbugs.gnu.org; Thu, 09 Jul 2020 11:38:09 -0400 Received: from mx.sdf.org ([205.166.94.24]:62878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtYcg-0006uC-L3 for 42147-done@debbugs.gnu.org; Thu, 09 Jul 2020 11:38:07 -0400 Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 069FbxeI020471; Thu, 9 Jul 2020 15:38:00 GMT From: Andrea Corallo References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <1690361185.4397117.1593879228865@mail.yahoo.com> <374F2E9C-E8C2-4362-8BEF-E6AA5EEE5C79@acm.org> <68F4CFD4-17BF-4ADA-B2EF-55281ACD2373@acm.org> <926674413.6042347.1594070583586@mail.yahoo.com> <475381031.6812910.1594139070322@mail.yahoo.com> <459BE59A-76CE-46A3-BE5E-B65AED0B85F5@acm.org> <4A6D5CD1-031E-4DF8-9FE5-365DF17E14CA@acm.org> Date: Thu, 09 Jul 2020 15:37:59 +0000 In-Reply-To: (Stefan Monnier's message of "Thu, 09 Jul 2020 10:35:51 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> What's your suggestion on this optimization? Do you think can be on with >> default settings or is it dangerous? > > AFAICT it's been on since Emacs-21, which seems to argue for "not too dangerous". Great, thanks both for your suggestions. BTW IMO if the only way to *certainly* get a mutable string is with `copy-sequence' or `make-string' I think we could document it. Is a simple rule easy to understand and clarifies the situation. Andrea -- akrl@sdf.org From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 17:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159569699224429 (code B ref 42147); Sat, 25 Jul 2020 17:10:02 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 17:09:52 +0000 Received: from localhost ([127.0.0.1]:51043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzNgG-0006Lx-8D for submit@debbugs.gnu.org; Sat, 25 Jul 2020 13:09:52 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:37274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzNgB-0006Lh-Q4 for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 13:09:51 -0400 Received: by mail-oi1-f196.google.com with SMTP id 12so10828977oir.4 for <42147@debbugs.gnu.org>; Sat, 25 Jul 2020 10:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=zzo5Wa95pyFnsQkfeKq9Csd/xFh7nZ+xRE+f3SUAnNk=; b=geoUBgXPoA4Px8ZsMS5PVg5aGSBOq7gYKtla70O55tySfeGg5JuR6loIlQlcJNlEG6 Abd+DqhJdvBKk9/6dCMe8+9p1DWVLJ2DjuPCvUoZlMsilOHfYKj5DUsfQuvld3da2qgg 0uaKBoJKRhkQPDNPbVJ6Hgfl20omR1Wkc/CoxCAPuVc2fiYNK/XRi84+Ha763042O/wC hAgkEQ3LYvAuZmIjajHq0A49D38eH3MjuCbb1fc9SPrwUlh8GmmVNAdWIvawmLkyRY9x HjPMeGI0dLzjXmM0MQ8QpHT1nzr6ss1huwKzpgT5hPAZ4rXdg0pg+07Q9n5acPhia77H +J4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=zzo5Wa95pyFnsQkfeKq9Csd/xFh7nZ+xRE+f3SUAnNk=; b=uM8n3EK//fhI8V4WelYmyzNdbuLziZDhC2UkqosevqWf+Kd5JxlkMuP6Vhd43iANQ8 MwgYfDKfzZrdLqbjJS/vFh7tl1dHhr315TEKjw2B1uDeJ9gVEKJ8bqGAA9v5BEKkZDR5 GOLIQbKzkiyJF60szxT2KFxE0Veg+Y5cWVEwcRzFklaB30vzpRr5hrQT5/PlZICzNDTV KAvnKuA2setacxVwh2GIH7rr8cmBP68dizU+RbhU7Kv5bSbFwMSv0hjnzAYLpV+H+YNq e2R+E5l8QfeGBMvXogZZCzP24+Sz1QcGfnuOlHhh/MamfoWLSE68PXVVnAmcFqB6GoJZ MthA== X-Gm-Message-State: AOAM533L1f/+rXI6j+0k05dLwfwgtj7EXX8Nt98I+72TX9UaKVyI2g1e y6x/3AnpjIoomH1Rg7d75R1RdXRJ8yCU+aOsisI= X-Google-Smtp-Source: ABdhPJxPNA5qNXvs3ZcEUFb/a9TyZzAIx9ylAmEZG8ZWkcMI61ZDyBEziBKD7JwO48L69FAwmP1HlA7ABWhSDnN/bkk= X-Received: by 2002:aca:b884:: with SMTP id i126mr12462304oif.65.1595696982081; Sat, 25 Jul 2020 10:09:42 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> In-Reply-To: <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> From: Philipp Stephani Date: Sat, 25 Jul 2020 19:09:30 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am Fr., 3. Juli 2020 um 11:25 Uhr schrieb Mattias Engdeg=C3=A5rd : > > 2 juli 2020 kl. 21.09 skrev Philipp Stephani : > > > I don't think most of those are pure, as they have to "look into" an > > object. For example, the result of "equal" does not only depend on the > > argument objects, but also the objects they refer to. > > Unless I'm mistaken, they are pure enough for the purpose of constant fol= ding, where the arguments are already known (constant) at compile-time; do = come with a counter-example if you disagree. > > Were you thinking about other uses of pure functions? Perhaps our notion = of purity is underspecified. > Yes, I think so. The term is mentioned in the Lisp manual, but I've always had trouble deciding whether a given function was pure or not. To be useful, the definition shouldn't depend on what the byte compiler happens to do; rather, we need to formally define purity (and side effect-freedom) based on the observable behavior of the function in question alone and then adapt the behavior of the byte compiler to the definition, if necessary. My working hypothesis is that "pure" is like GCC's "const" (https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html) and "side-effect free" is like GCC's "pure." That is, a side-effect free function can dereference pointers stored in Lisp_Objects, but a pure function can't. So functions like consp or eq are pure, while car or equal are merely side-effect free. eql is a bit of an exception, as floating-point objects and big integers are truly immutable, so it probably also qualifies as pure using this definition. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 18:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Stephani Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159570066530043 (code B ref 42147); Sat, 25 Jul 2020 18:12:01 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 18:11:05 +0000 Received: from localhost ([127.0.0.1]:51092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzOdV-0007oV-EI for submit@debbugs.gnu.org; Sat, 25 Jul 2020 14:11:05 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzOdS-0007o0-GZ for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 14:11:04 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id EA2D54407C3; Sat, 25 Jul 2020 14:10:56 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B2A4144073B; Sat, 25 Jul 2020 14:10:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1595700632; bh=oaQxZ9mWaWUH4UucRq8Nr+QKfsAR9t0kejfetfYOXmM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=adzHZOmSsf1QYuZ5xtk+BsoVk4gV9R1kt2gi+QGGRVkRRKYWddcT0Wma7Spyf/wfZ UDRVKH81s+o2wshCGlmdO9819X2ibiG5Ob0eKpE9/b95973xIBwr6324vxRKyVIt+P F95IgeKo+GCgGaQH2l+RfQgASFSqimf+z1aTelXsSb/nexNJXN2S0jz3+iCJbhvBm3 sI0bFuMRlzsKAMZt5i9v4S0Us10DHmct8veY+6XcP9ZnTbCy5Hgdkcl/H9ASJ5YseJ 3njQaP4vP+NVaiKKIV85jxsnq4dK7mD8P06kOIYfGwlPp7RcWsepL4EDU293VZ7At/ exISwc9cUCkmQ== Received: from milanesa (unknown [104.247.229.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6CD581202C1; Sat, 25 Jul 2020 14:10:32 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> Date: Sat, 25 Jul 2020 14:10:31 -0400 In-Reply-To: (Philipp Stephani's message of "Sat, 25 Jul 2020 19:09:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.142 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > and "side-effect free" is like GCC's "pure." That is, a side-effect > free function can dereference pointers stored in Lisp_Objects, but a > pure function can't. I think it's still not very satisfactory since it's written in terms of low-level operations in the C code. I think the current intention of our "pure" goes something along the lines of: the function will always return the "same" (the sense of `eql`) value (or signal the same error) when called with `eql` arguments. IOW "the function preserves `eql`ity". Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 20:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15957074088265 (code B ref 42147); Sat, 25 Jul 2020 20:04:01 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 20:03:28 +0000 Received: from localhost ([127.0.0.1]:51203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzQOF-00029F-Jv for submit@debbugs.gnu.org; Sat, 25 Jul 2020 16:03:27 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:36725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzQO8-00028v-56 for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 16:03:22 -0400 Received: by mail-oi1-f194.google.com with SMTP id s144so1130710oie.3 for <42147@debbugs.gnu.org>; Sat, 25 Jul 2020 13:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9jWMODdMVeipg9JBt6ZFVJwbKsp1WIhtQD/ZbOtf2NI=; b=LWRymqA+5Ugi7oeXlbkb2PTC0j9WWvSTZBiKB9YbLU3wyxZMAYdKhjoJdt/d5lT9I9 moq6fTquVGdar9oJ29V/G5SbzqtaHlaF9VlFqzv3JbXil1nNkgyNDTWSxmlQ9iGN8xM4 WSgkQapOhxD7NOrKhujayqbi5Ss3ACBYoR//R8JE6MEZdw3WugLXhL/TtInnX8aUoLTh psaFa8ZLBWFcpM8rfQMjZHE8LcOjihXJzf29W7Il7y+/gKgmoNlPCR1LICQQGN1CUxzz im2xoQ2qz6HItJCjIi7QVFD2vRL2/GaIg33jUKgdiyj0GMotKVYr7b0Z0FaIsMyI7ixZ Kpiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9jWMODdMVeipg9JBt6ZFVJwbKsp1WIhtQD/ZbOtf2NI=; b=ZdgVHAN/kWwRsTKtzzVbvpvPolp42tToPtZrrxLFkIuLyp+jcMmf5bqn5gVflmnLjV HThM7Gg2C9DfvO/ZrXTmEEjrrVNWv/3eeJzvEXYqqZcScEDNVKze2jh57oki/CxjRs+V TtbTMuyfiRl0S644Ys8VUFLRq4UMMSoF7fN9YPfcOfHVZOoN/Fp/hn45JAsnhAnWQ4Vy rgncKfRffNs7E9VoAyvnEYMzmRF8pMsnjLqolPxaSDOyjZIBUvhgh7zG4qKvY1IwlQ07 brb8Gre7fTMOAAV2T+b4o3ts0OY4JAOHnLLWBsIHPoJfCms2ukyNv+qIq9j0dWFImada m3xQ== X-Gm-Message-State: AOAM532AceTeX1hXDTEVLmssfU2JQVwPPQAu9s3M0S+LIxHa8kts0rf+ Rd/NyScoOH/kFe/iX7w2Zn6DEDF3qt8M/H4mOj8= X-Google-Smtp-Source: ABdhPJwuXZsiLdOKccrD/daDOFWUqKM/fBp340nTbOf7ZUcWqNu8LfJcEoqU3a/tEfp5tfbKQfKBJtsvADEAL2Vyh8A= X-Received: by 2002:aca:54d3:: with SMTP id i202mr12930736oib.170.1595707394364; Sat, 25 Jul 2020 13:03:14 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> In-Reply-To: From: Philipp Stephani Date: Sat, 25 Jul 2020 22:03:03 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am Sa., 25. Juli 2020 um 20:10 Uhr schrieb Stefan Monnier : > > > and "side-effect free" is like GCC's "pure." That is, a side-effect > > free function can dereference pointers stored in Lisp_Objects, but a > > pure function can't. > > I think it's still not very satisfactory since it's written in terms of > low-level operations in the C code. Agreed, I'd rather think of this hypothesis as a first step towards a definition that we can put into the manual. > > I think the current intention of our "pure" goes something along the > lines of: the function will always return the "same" (the sense of `eql`) > value (or signal the same error) when called with `eql` arguments. > IOW "the function preserves `eql`ity". > That sounds like a very reasonable definition. Do you think it's equivalent to my hypothesis and/or to the current behavior of the byte optimizer? Is it a complete definition in the sense that it gives an unambiguous yes/no answer for every current and future function? From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 20:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Stephani Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15957076868792 (code B ref 42147); Sat, 25 Jul 2020 20:09:02 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 20:08:06 +0000 Received: from localhost ([127.0.0.1]:51220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzQSj-0002Hk-UV for submit@debbugs.gnu.org; Sat, 25 Jul 2020 16:08:06 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzQSi-0002H8-4i for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 16:08:04 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D027680B35; Sat, 25 Jul 2020 16:07:58 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8E6D880541; Sat, 25 Jul 2020 16:07:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1595707661; bh=POnqbz+4+K2wYJfsjlOOZSWHqIDd6KQhFlJMvcBi0PY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=drAbBo+O7vBS7Mi9Thg0lOQ1dmzS+edIySzgSo5uRn2wrZVg5vEtf8uVuYTN4wCsD nT2QgJfUdkj012dBokVL+VJR252zdfL4WJZNthoNYKeLAvvOy4z+oU0aVRYLCvWqab Bi9TQVKS50zpL/I0djGSdFUMkzeWIMRzBnxg+ikdeXg6F+pJ31z5lEyc6at87TE8lc OUowrONYuHfss2yMb92yLiAn1QOVcA7zvf+9lG6ZWzBO4QyB3YNasVedqTVvxEIX5K GwyV3+YCW2HLEifjZbrYpUnijn91R8TN7LznICvC5+Oiv2lq0VJeH0aVZJN1OUBpv/ xIvLYhbA3NmBw== Received: from milanesa (unknown [104.247.229.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 47FBA12059A; Sat, 25 Jul 2020 16:07:41 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> Date: Sat, 25 Jul 2020 16:07:37 -0400 In-Reply-To: (Philipp Stephani's message of "Sat, 25 Jul 2020 22:03:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.174 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > That sounds like a very reasonable definition. Do you think it's > equivalent to my hypothesis and/or to the current behavior of the byte > optimizer? Probably not exactly: there might be functions which don't always "preserve `eql`" but for which we decide nevertheless that it's OK to precompute them at compile time for pragmatic reasons. E.g. `concat`. Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 20:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15957079329210 (code B ref 42147); Sat, 25 Jul 2020 20:13:02 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 20:12:12 +0000 Received: from localhost ([127.0.0.1]:51232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzQWh-0002OU-UQ for submit@debbugs.gnu.org; Sat, 25 Jul 2020 16:12:12 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:39316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzQWf-0002OE-Pi for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 16:12:10 -0400 Received: by mail-oi1-f195.google.com with SMTP id w17so11069776oie.6 for <42147@debbugs.gnu.org>; Sat, 25 Jul 2020 13:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=bdJ9MZ4nOvYMuQKRWIRjAVlnR3lW5q5KAbHBldL4wWw=; b=MW0r2Bm/W0kkweAmkIXuo/QeDNcOus6d2iBdn7lOe6qS+6MpgJH87cXeClNP95Es6u rsSaxShbragw6tnO7JU2sWfdCnsNa/J5eTLnoqakkjXHFieBIqBFFH1+Mukb+DmvHsrC rx/OEoXMEzk6dohBa1xxAB5uLShDgsb387XYw/CW1h50y1kc3bVlls8GUP8Hd3Pt7FT/ LTRZB/QjayhvlZdQlDA632MTS9Y7j4exkVTOGtZtdRQXhGW+5wOR5/6oA4dPGvv9kIO8 rYjp/Q1cBSasEBBBe0NwkTtnaLdpugr/+sq9OwIAHH9xQLPwSGrBnGB14L3AorYjZvU/ M2TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=bdJ9MZ4nOvYMuQKRWIRjAVlnR3lW5q5KAbHBldL4wWw=; b=Qm0uI+O1HDrWz35mOHMNOkuZQGX93aAhRTDeEiYYHETg+Egh4aGe20fkGrf4xLkJeC B5tvjXTC41yMwP0M24SG3Xgcx6ngOaUIa+UZSL9ohPCR7M71nEW3dRVkA2IbGsGICS8z ntf8FQITRgb425sspg0Gn3mzPG6gVtPHrr5yirmZhFt6F/Vr9xtoTQVvPiCw7wAa7P5d htuYaDSGtc2yOyMO/3NowCKs6P+wL/n/0DRfqDhL3/d1U53qz5dS6vKPsjb9sspVZvwd 1AcWjuRnjDS2DyA2mIFgOTd8G5bQTTr7oGZd6v3ala46dqg9ylB8/+t84lh2Gle81gsf 47kw== X-Gm-Message-State: AOAM531SM82fCW2VLJ8uUXjSWdYCiOfp6UgghaUIcFy9hBEFXpub9h4q G8IXM7axThuvPZq2yV0ZKFR3N8zMqCrheOHZEns= X-Google-Smtp-Source: ABdhPJyIiwSUCG2CyMWMfANtMcpcuVPnGlVgwGnbHGxV11K6VGAWx8MoaoDQjbdbpmzlQPpI7Zs7R085rJC4opNP90s= X-Received: by 2002:aca:b884:: with SMTP id i126mr12880404oif.65.1595707924199; Sat, 25 Jul 2020 13:12:04 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> In-Reply-To: From: Philipp Stephani Date: Sat, 25 Jul 2020 22:11:52 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Am Sa., 25. Juli 2020 um 22:07 Uhr schrieb Stefan Monnier : > > > That sounds like a very reasonable definition. Do you think it's > > equivalent to my hypothesis and/or to the current behavior of the byte > > optimizer? > > Probably not exactly: there might be functions which don't always > "preserve `eql`" but for which we decide nevertheless that it's OK to > precompute them at compile time for pragmatic reasons. > > E.g. `concat`. I don't think we can really do that, as that would allow the byte compiler to introduce bugs in the code, right? The manual states that "This function [concat] always constructs a new string that is not =E2=80=98eq=E2=80=99 to any existing string" so I don't see how it could ev= er be pure. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 21:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Stephani Cc: Paul Eggert , Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159571085613729 (code B ref 42147); Sat, 25 Jul 2020 21:01:01 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 21:00:56 +0000 Received: from localhost ([127.0.0.1]:51250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRHs-0003ZM-Fd for submit@debbugs.gnu.org; Sat, 25 Jul 2020 17:00:56 -0400 Received: from mail1480c50.megamailservers.eu ([91.136.14.80]:38032 helo=mail118c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRHp-0003Yu-An for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 17:00:55 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1595710837; bh=Sr4g8fKQQQwm16Yo/E5uOHZuZvgydZlS1hHx9QmC4z0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=sDk0gu8CpLZ8gW8UlsMVdnPhdua7RcS8qRPigKGMYmOWbNi8nLhhSxvoDVAdyLEnP VwjxXShBgE1hBlN1vzHcCHWDMNH+/x+G5MelTrNF8aBLBFrSOLiZQ+PjAaykzzIx5B g8Tyg+m73T+IB5Z4Ru9RqjylojygbxUO1Yuy/p/E= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 06PL0YUP007872; Sat, 25 Jul 2020 21:00:35 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Sat, 25 Jul 2020 23:00:33 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F1B.5F1C9D75.0015:SCFSTAT68638221, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: -4.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=KaGsTjQD c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=pGLkceISAAAA:8 a=vfDNckH_IXM4D5rU_z8A:9 a=QEXdDO2ut3YA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 25 juli 2020 kl. 22.11 skrev Philipp Stephani : > The manual states that > "This function [concat] always constructs a new string that is not > =?UTF-8?Q?=E2=80=98eq=E2=80=99?= to any existing string" so I don't see how it could ever be pure. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 25 juli 2020 kl. 22.11 skrev Philipp Stephani : > The manual states that > "This function [concat] always constructs a new string that is not > =E2=80=98eq=E2=80=99 to any existing string" so I don't see how it = could ever be pure. Actually that part of the manual was corrected fairly recently, as that = statement hasn't been true for decades. More to the point, the current set of functions marked as 'pure' are = really the superset 'pure-absent-mutation': functions that are pure when = it can be assumed that the arguments are not modified. This assumption = can be based on physical immutability (integers), by convention (string = constants), or anything else the compiler can prove such as control = flow. There is also the question of what equality to use and here the answer = is probably 'equal' since we are only dealing with immutables. (The = return values of these functions cannot be considered mutable for = obvious reasons, so make-string is out.) If you want to rename the property accordingly then I won't object. In = any case, it is certainly a good idea to be precise about what the = various sets really mean. There are also some functions declared 'pure' that appear to have side = effects: kbd, package-get-version From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 21:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Stephani Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159571139314501 (code B ref 42147); Sat, 25 Jul 2020 21:10:02 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 21:09:53 +0000 Received: from localhost ([127.0.0.1]:51258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRQW-0003lp-Mn for submit@debbugs.gnu.org; Sat, 25 Jul 2020 17:09:52 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRQU-0003lc-Vt for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 17:09:51 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 63BD01002D8; Sat, 25 Jul 2020 17:09:45 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D7DB01002AC; Sat, 25 Jul 2020 17:09:43 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1595711383; bh=ROY+2BZoVdRPXoLPb5T9xoBD9ghEnI+j5tGRsroVBhI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=i5lZ2XTdjC9OQJ/pI1DIcExm4fGkRjKVDjbtvntKnGoJyONdg4fYiapxibn3S0nrO ou7ptq+bRPObidE7brIK4khsT02j1RvL+ysaWmIWaR5f8QQO/Lz3AM7FzGrBw/yJof +Y4E0l15dg3arkU5yJ81SpUZ1ToGt4ksZy6BvV9aLscrMta+Xe6wyXeCEGK8OH0Ps/ 03tYRy2IBeMjL8VurYRNro0u4zeE0y2bhQmG0QZuc0bcntVe3xuXyz9VrIFm2V0b+f i9hYH8/LJiYpcFLhpx1+sbFndBhXU5AsXe36PyuTxalFnwfs5FADDG6iLbOQHoXBXD K2lo5Dl9vNW+g== Received: from milanesa (unknown [104.247.229.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 70CE412059A; Sat, 25 Jul 2020 17:09:43 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> Date: Sat, 25 Jul 2020 17:09:42 -0400 In-Reply-To: (Philipp Stephani's message of "Sat, 25 Jul 2020 22:11:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.130 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I don't think we can really do that, as that would allow the byte > compiler to introduce bugs in the code, right? The manual states that > "This function [concat] always constructs a new string that is not > =E2=80=98eq=E2=80=99 to any existing string" so I don't see how it could = ever be pure. And yet, `concat` has been marked as "pure" even before we introduced the notion of pure. More specifically, the code in byte-opt.el which optimizes calls to pure functions was originally written exclusively for `concat`: commit 79d137ffe7dac5fe3041b4916c715f4ce91143af Author: Karl Heuer Date: Mon Nov 3 03:58:23 1997 +0000 =20=20=20=20 (byte-optimize-concat): New function. followed by: commit e856a453a1c1ce1907b3b582841bce3e9cff8cec Author: Stefan Monnier Date: Mon Mar 22 15:21:08 2004 +0000 =20=20=20=20 (byte-compile-log-lap, byte-compile-inline-expand): Use backquote. (byte-optimize-pure-func): Rename from byte-optimize-concat. (symbol-name, regexp-opt, regexp-quote): Mark as pure. -- Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 21:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Philipp Stephani , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159571256916240 (code B ref 42147); Sat, 25 Jul 2020 21:30:02 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 21:29:29 +0000 Received: from localhost ([127.0.0.1]:51272 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRjU-0004Ds-Vt for submit@debbugs.gnu.org; Sat, 25 Jul 2020 17:29:29 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRjS-0004Df-L0 for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 17:29:27 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 36E3B1004B6; Sat, 25 Jul 2020 17:29:21 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 879A510033A; Sat, 25 Jul 2020 17:29:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1595712551; bh=cLh7Vo1MkrNU2vzRM9Yy3RBJPjE8MWWwW4r75e5Vqbc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CpwTbScDPVpnAyy7yvtu2VbCk1qtNOH6U/6nS0E/Jg0K70qrmuV90BeWPVQ4T6ZqE 34nEti49MT1fEh5Ka3AVpg9XfqSW0IIJS+J5wsJ28/PrSqlRfsPd+6PGEyUQEuj1yt O5GSe321JxGZsNX2CJ88vo34NTUX43kybPuOKYY9aCVGqyZaOHm03Xuqbm/urqQMds mNOW54g959qxxLszPmIUwbeamRGbRZ4fzebnTV5Afnull5Df3xiBVLln16CYZSIoCp 7V/ghlGK4/+IAZ3vneAw2+BBJE7PhSVImVGYnLAufiWJ2v+IJds4zaRQE7LoZjMuUi wiD/ip9GS6q9w== Received: from milanesa (unknown [104.247.229.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 48EC81202C1; Sat, 25 Jul 2020 17:29:11 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> Date: Sat, 25 Jul 2020 17:29:10 -0400 In-Reply-To: <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Sat, 25 Jul 2020 23:00:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.130 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > There are also some functions declared 'pure' that appear to have side > effects: kbd, package-get-version Which side-effects are you thinking of? Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 21:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159571316517163 (code B ref 42147); Sat, 25 Jul 2020 21:40:02 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 21:39:25 +0000 Received: from localhost ([127.0.0.1]:51281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRt7-0004Sl-4O for submit@debbugs.gnu.org; Sat, 25 Jul 2020 17:39:25 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:40267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzRt4-0004SX-HS for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 17:39:23 -0400 Received: by mail-ot1-f65.google.com with SMTP id c25so9639892otf.7 for <42147@debbugs.gnu.org>; Sat, 25 Jul 2020 14:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=33/9NFnKyM36ZdBctpAEvEBHkWNm/4ofh9SdZrC/yKk=; b=lsTuyzXxm4IlvMOQqv/y3xR4M5nRtTHYyvFQaJNGitoGOAz6elKw1XjZLKPbQU0Zp0 Grh9nd2RHAcQnu1qv6EwobH5ZbDbjB9ZtV7kYFitgFsvLIN9lJvryG+xm3n6FUM1ULL3 dQAMRHVgUzPgob8dkipls5UxfDpn2l/SISn7wgDWXGTi/aM12iOrZ7+ClY6Kj42x7zgL afeDPTaSkFHunu1eCy6N/rqSY+iTqHoXBmfTHc215yvY26Fk1Ba7lv7kTD5nVFYr6lS3 3pkax5v9l3cOHfNFrCM7W8PmMxSW5F6VdmMAEdCV416agLZF2GECNNaFIcYY0l3Tw77Q nuCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=33/9NFnKyM36ZdBctpAEvEBHkWNm/4ofh9SdZrC/yKk=; b=NM1xmY/hnGT15kdafTVcfqgMRjtr+wUFvogwxjKfJB9sF0qgle8q2I99hWrS3diAM8 fIb1Xg80epjCimbt7rxd9+k7/Opgv1RC2lRm166H5bLgkFNuVCRS9Zm/w5igFGNM7cJr 2oC0aKn1HWqUo52PEtwcN9XclNhQfQg6X2IP9boloUfDO9xJMGwrc8yaWHt54bOWl5qm r0KVNXQZnYhQWrtMeUi03ETlkhwTyV/jLrhvX2PHH3Ga1PFAeIoIkR1o+/m12B6VQm51 teb4G/HcbpIzDWXgIHJiiOpY/Gb3uKSqCKW73xwPKroHa05L73JsgrqDP7vMtuMYrNAK kE2A== X-Gm-Message-State: AOAM530ywo4jOnLEmOxDE6UlCLcl8fYG+ZNRJSgGmi14LU/f9W1GDH78 XVk+3f4jxYLZ2nYaPYnVbhy9AxtXIkshbZLPjYk= X-Google-Smtp-Source: ABdhPJx7rAzM/PAQ+hoFdvP3X+XXGFV64JAxdHI+JEkeGWzapWCGdeQ2LCYUB6ftyhj5HouwdHWdrzy37hGT3Gb9/BA= X-Received: by 2002:a9d:2203:: with SMTP id o3mr13648477ota.149.1595713156809; Sat, 25 Jul 2020 14:39:16 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> In-Reply-To: From: Philipp Stephani Date: Sat, 25 Jul 2020 23:39:05 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am Sa., 25. Juli 2020 um 23:29 Uhr schrieb Stefan Monnier : > > > There are also some functions declared 'pure' that appear to have side > > effects: kbd, package-get-version > > Which side-effects are you thinking of? > I wouldn't know about side effects, but `kbd' is definitely not pure by the "homomorphism w.r.t. eql" definition as it takes a string argument. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 21:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Philipp Stephani , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159571409218501 (code B ref 42147); Sat, 25 Jul 2020 21:55:01 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 21:54:52 +0000 Received: from localhost ([127.0.0.1]:51289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzS83-0004oL-Ol for submit@debbugs.gnu.org; Sat, 25 Jul 2020 17:54:51 -0400 Received: from mail1438c50.megamailservers.eu ([91.136.14.38]:43104 helo=mail263c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzS80-0004o4-Lj for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 17:54:50 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1595714073; bh=UBnbMSitYG3NF2lZMDRZMjGbGZWWRcej/AVCGl4HYN4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=evVbUb26CbGllcrlKF9pV68ZhcFZbNskT7/b+cT+2eBAupqWpfNOLJdp125KB77mr KB4/Hbt2mNdED9pfmsY67s6yGOJpFKn+Sjy2V/Q6NtuH6Ttw0EJ8CUtvs/it3V82A2 d1VixypWFvMWb9Vif+w7GVISOao94EjRdrRksFVA= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 06PLsU68017628; Sat, 25 Jul 2020 21:54:31 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Sat, 25 Jul 2020 23:54:29 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F15.5F1CAA19.0022:SCFSTAT68638221, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: -4.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=e6d4tph/ c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=mgLsKegD02P0Ntt6NW4A:9 a=CjuIK1q_8ugA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 25 juli 2020 kl. 23.29 skrev Stefan Monnier : > >> There are also some functions declared 'pure' that appear to have side >> effects: kbd, package-get-version > > Which side- [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 25 juli 2020 kl. 23.29 skrev Stefan Monnier : >=20 >> There are also some functions declared 'pure' that appear to have = side >> effects: kbd, package-get-version >=20 > Which side-effects are you thinking of? They both clobber the match data. Not that it matters for the purpose of = compile-time evaluation, but we were discussing exact definitions. ('package-get-version' does a lot more but at least it admits to lying = in a comment, so I suppose that's all right then.) From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 22:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Stephani Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159571604621429 (code B ref 42147); Sat, 25 Jul 2020 22:28:02 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 22:27:26 +0000 Received: from localhost ([127.0.0.1]:51317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzSda-0005ZZ-CJ for submit@debbugs.gnu.org; Sat, 25 Jul 2020 18:27:26 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzSdV-0005ZI-Vs for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 18:27:24 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D6F5E8079B; Sat, 25 Jul 2020 18:27:15 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 25AB980836; Sat, 25 Jul 2020 18:27:14 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1595716034; bh=UnBO0nZa1U3oOLP2XfBUIbUsCailnY554nq2bGr1hjw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=W30/x/6pKUvy2g44e6vvkTymVuStSDvk2OtJ/4gqSGJBGXyYuvXu+xI9fLGTz+lnY f9UCH1PSfTKgyYsfpDfMkVf9uJuwSbCAryFDhzXmMcAPL2PvKs8eiKBaqEJEMvtjA3 N3aw0UHVzLpJ4AEVWLJUDHeMH1ZNlUJvxd51kLj1SS21p8hy2hN1i7ipoKokJj06MT bCSXquWi8EQa7ISFA6kdPbLqLp5IeZkUN+dFrdN2uIOYrDmxKETbIPtw09Fb0YN43u rcixMG2ulbTzglNn/eiiXMVl7JLvcIIpv1DM1dW6NuqDWQN0I4JDVFWfqTpnOzk2IL I1pFixsuHiPHA== Received: from milanesa (unknown [104.247.229.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E00D3120268; Sat, 25 Jul 2020 18:27:13 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> Date: Sat, 25 Jul 2020 18:27:13 -0400 In-Reply-To: (Philipp Stephani's message of "Sat, 25 Jul 2020 23:39:05 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.170 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> > There are also some functions declared 'pure' that appear to have side >> > effects: kbd, package-get-version >> >> Which side-effects are you thinking of? >> > > I wouldn't know about side effects, but `kbd' is definitely not pure > by the "homomorphism w.r.t. eql" definition as it takes a string > argument. Taking string arguments is not a problem (`eql` strings are also `equal`). It's returning a fresh new string/vector that is a problem (which also affects `kbd`, indeed). Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 22:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Philipp Stephani , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159571622021770 (code B ref 42147); Sat, 25 Jul 2020 22:31:01 +0000 Received: (at 42147) by debbugs.gnu.org; 25 Jul 2020 22:30:20 +0000 Received: from localhost ([127.0.0.1]:51323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzSgN-0005f4-Qy for submit@debbugs.gnu.org; Sat, 25 Jul 2020 18:30:20 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzSgM-0005ep-Q1 for 42147@debbugs.gnu.org; Sat, 25 Jul 2020 18:30:19 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 84D8780B35; Sat, 25 Jul 2020 18:30:13 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A426280836; Sat, 25 Jul 2020 18:30:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1595716211; bh=aE3QuZScFwaGVKE2hoITNFDtqomiYEa2xG9k73NUxxQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=UYM10srpr4zmHBeims27E4HZ/+SrUSvjhiUmWX3L7yNTELn4x3e+A7E+0J5W5C/En PsGXl46DWKGojge6sYw6BcxXr+YU3xRR3atNkGFs3eVFgk0aV77/rR72d9QV95HD+4 QcAu3LFvqzHw1+RR+hmOWI+tBNUh6eZlU0KRipwYpLCBOYqQArREt/c3u3QvvN0iOY ye6wxsCxveiIGYceWTtZoh5jOkMU/5pCQvjhcSmiE/tqs5NqNjuty8qu2C15HpRyHr tGyqxocNBPGVoK8G7uVq7gX6IK7H9dePgbZrAx6of2lv59HBM5NhstRUy6NRftsTr2 xcyLSNYXdNFfw== Received: from milanesa (unknown [104.247.229.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6682F120403; Sat, 25 Jul 2020 18:30:11 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> Date: Sat, 25 Jul 2020 18:30:10 -0400 In-Reply-To: <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Sat, 25 Jul 2020 23:54:29 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.169 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> There are also some functions declared 'pure' that appear to have side >>> effects: kbd, package-get-version >> Which side-effects are you thinking of? > They both clobber the match data. It's not a problem w.r.t optimizing pure functions, tho: those functions don't promise to modify the match data, so it's OK to replace calls to them with their return value. But yes, it's a problem because `C-h o kbd RET` says explicitly that it doesn't change the match data :-( Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Jul 2020 09:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Philipp Stephani , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159575436416389 (code B ref 42147); Sun, 26 Jul 2020 09:07:01 +0000 Received: (at 42147) by debbugs.gnu.org; 26 Jul 2020 09:06:04 +0000 Received: from localhost ([127.0.0.1]:51784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzcbc-0004GH-0b for submit@debbugs.gnu.org; Sun, 26 Jul 2020 05:06:04 -0400 Received: from mail1438c50.megamailservers.eu ([91.136.14.38]:43506 helo=mail263c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzcbX-0004Fk-U0 for 42147@debbugs.gnu.org; Sun, 26 Jul 2020 05:06:03 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1595754350; bh=z6V1ROhWTX6PSm9CNPX6yDD+G3AhP2O3qLbflQ8p+jo=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=OzaE8GJV4gQg9Ode2E4Z1/r63YeZiVAlIxdktK3J2DU1fAgAPz1U4tqmlGY63JfrU Et5K7nO7HmM7pQwmIVy7KpxR4iIQf/+cmwtAJfi6LXxvoBgwbHcjppGon3UD98Q9Wx bNi09g+tNSpdbKSXd7FQBVQfcn+1OsKpxFOmejso= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail263c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 06Q95kZa015327; Sun, 26 Jul 2020 09:05:48 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: <81F989D1-3CC4-450B-89D6-E9C16F766277@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_7CD49673-F51C-4244-97ED-4AC16210C311" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Date: Sun, 26 Jul 2020 11:05:45 +0200 In-Reply-To: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F21.5F1D476E.000A:SCFSTAT68638221, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: -4.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=e6d4tph/ c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=yH5Vgya-m5LGbCV1YtEA:9 a=CjuIK1q_8ugA:10 a=ENOmLqmOUNYA:10 a=IC-H6EgDmPjHCZcLhs4A:9 a=B2y7HmGcmWMA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 26 juli 2020 kl. 00.30 skrev Stefan Monnier : > But yes, it's a problem because `C-h o kbd RET` says explicitly that it > doesn't change the match data :-( Motivation enough for them to save the match data then. What about the attached patch? Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_7CD49673-F51C-4244-97ED-4AC16210C311 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 26 juli 2020 kl. 00.30 skrev Stefan Monnier : > But yes, it's a problem because `C-h o kbd RET` says explicitly that it > doesn't change the match data :-( Motivation enough for them to save the match data then. What about the attached patch? --Apple-Mail=_7CD49673-F51C-4244-97ED-4AC16210C311 Content-Disposition: attachment; filename=0001-Preserve-match-data-in-kbd-and-package-get-version.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Preserve-match-data-in-kbd-and-package-get-version.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ba851b70be4211695937fa7fbac7ee38bbbfa4aa=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Sun,=2026=20Jul=202020=2010:51:42=20+0200=0A= Subject:=20[PATCH]=20Preserve=20match=20data=20in=20'kbd'=20and=20= 'package-get-version'=0A=0A*=20lisp/emacs-lisp/package.el=20= (package-get-version):=0A*=20lisp/subr.el=20(kbd):=20Preserve=20match=20= data,=20since=20these=20functions=20are=0Adeclared=20pure=20(see=20= discussion=20in=20bug#42147).=0A---=0A=20lisp/emacs-lisp/package.el=20|=20= 39=20+++++++++++++++++++-------------------=0A=20lisp/subr.el=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20|=20=207=20+++----=0A=202=20files=20= changed,=2023=20insertions(+),=2023=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/emacs-lisp/package.el=20b/lisp/emacs-lisp/package.el=0Aindex=20= e6f54d206d..b87f568650=20100644=0A---=20a/lisp/emacs-lisp/package.el=0A= +++=20b/lisp/emacs-lisp/package.el=0A@@=20-3936,25=20+3936,26=20@@=20= package-get-version=0A=20=20=20=20=20=20=20=20=20=20(or=20(if=20(boundp=20= 'byte-compile-current-file)=20byte-compile-current-file)=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20=20load-file-name=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20buffer-file-name)))=0A-=20=20=20=20(cond=0A-=20=20=20=20=20= ((null=20file)=20nil)=0A-=20=20=20=20=20;;=20Packages=20are=20normally=20= installed=20into=20directories=20named=20"-",=0A-=20=20=20=20=20= ;;=20so=20get=20the=20version=20number=20from=20there.=0A-=20=20=20=20=20= ((string-match=20= "/[^/]+-\\([0-9]\\(?:[0-9.]\\|pre\\|beta\\|alpha\\|snapshot\\)+\\)/[^/]+\\= '"=20file)=0A-=20=20=20=20=20=20(match-string=201=20file))=0A-=20=20=20=20= =20;;=20For=20packages=20run=20straight=20from=20the=20an=20elpa.git=20= clone,=20there's=20no=0A-=20=20=20=20=20;;=20"-"=20in=20the=20= directory=20name,=20so=20we=20have=20to=20fetch=20the=20version=0A-=20=20= =20=20=20;;=20the=20hard=20way.=0A-=20=20=20=20=20(t=0A-=20=20=20=20=20=20= (let*=20((pkgdir=20(file-name-directory=20file))=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20(pkgname=20(file-name-nondirectory=20= (directory-file-name=20pkgdir)))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20= (mainfile=20(expand-file-name=20(concat=20pkgname=20".el")=20pkgdir)))=0A= -=20=20=20=20=20=20=20=20(when=20(file-readable-p=20mainfile)=0A-=20=20=20= =20=20=20=20=20=20=20(require=20'lisp-mnt)=0A-=20=20=20=20=20=20=20=20=20= =20(with-temp-buffer=0A-=20=20=20=20=20=20=20=20=20=20=20=20= (insert-file-contents=20mainfile)=0A-=20=20=20=20=20=20=20=20=20=20=20=20= (or=20(lm-header=20"package-version")=0A-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(lm-header=20"version")))))))))=0A+=20=20=20=20= (save-match-data=20=20=20=20=20=20=20=20=20=20=20=20;=20Since=20the=20= function=20is=20declared=20pure.=0A+=20=20=20=20=20=20(cond=0A+=20=20=20=20= =20=20=20((null=20file)=20nil)=0A+=20=20=20=20=20=20=20;;=20Packages=20= are=20normally=20installed=20into=20directories=20named=20= "-",=0A+=20=20=20=20=20=20=20;;=20so=20get=20the=20version=20= number=20from=20there.=0A+=20=20=20=20=20=20=20((string-match=20= "/[^/]+-\\([0-9]\\(?:[0-9.]\\|pre\\|beta\\|alpha\\|snapshot\\)+\\)/[^/]+\\= '"=20file)=0A+=20=20=20=20=20=20=20=20(match-string=201=20file))=0A+=20=20= =20=20=20=20=20;;=20For=20packages=20run=20straight=20from=20the=20an=20= elpa.git=20clone,=20there's=20no=0A+=20=20=20=20=20=20=20;;=20"-"=20= in=20the=20directory=20name,=20so=20we=20have=20to=20fetch=20the=20= version=0A+=20=20=20=20=20=20=20;;=20the=20hard=20way.=0A+=20=20=20=20=20= =20=20(t=0A+=20=20=20=20=20=20=20=20(let*=20((pkgdir=20= (file-name-directory=20file))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(pkgname=20(file-name-nondirectory=20(directory-file-name=20pkgdir)))=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(mainfile=20= (expand-file-name=20(concat=20pkgname=20".el")=20pkgdir)))=0A+=20=20=20=20= =20=20=20=20=20=20(when=20(file-readable-p=20mainfile)=0A+=20=20=20=20=20= =20=20=20=20=20=20=20(require=20'lisp-mnt)=0A+=20=20=20=20=20=20=20=20=20= =20=20=20(with-temp-buffer=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (insert-file-contents=20mainfile)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(or=20(lm-header=20"package-version")=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(lm-header=20"version"))))))))))=0A=20=0A=20=0C= =0A=20;;;;=20Quickstart:=20precompute=20activation=20actions=20for=20= faster=20start=20up.=0Adiff=20--git=20a/lisp/subr.el=20b/lisp/subr.el=0A= index=2010c37e9413..70a6ec7ab2=20100644=0A---=20a/lisp/subr.el=0A+++=20= b/lisp/subr.el=0A@@=20-891,10=20+891,9=20@@=20kbd=0A=20`edmacro-mode').=0A= =20=0A=20For=20an=20approximate=20inverse=20of=20this,=20see=20= `key-description'."=0A-=20=20;;=20Don't=20use=20a=20defalias,=20since=20= the=20`pure'=20property=20is=20true=20only=20for=0A-=20=20;;=20the=20= calling=20convention=20of=20`kbd'.=0A-=20=20(read-kbd-macro=20keys))=0A= -(put=20'kbd=20'pure=20t)=0A+=20=20(declare=20(pure=20t))=0A+=20=20;;=20= A=20pure=20function=20is=20expected=20to=20preserve=20the=20match=20= data.=0A+=20=20(save-match-data=20(read-kbd-macro=20keys)))=0A=20=0A=20= (defun=20undefined=20()=0A=20=20=20"Beep=20to=20tell=20the=20user=20this=20= binding=20is=20undefined."=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_7CD49673-F51C-4244-97ED-4AC16210C311-- From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jul 2020 12:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159602729931265 (code B ref 42147); Wed, 29 Jul 2020 12:55:02 +0000 Received: (at 42147) by debbugs.gnu.org; 29 Jul 2020 12:54:59 +0000 Received: from localhost ([127.0.0.1]:60332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0lbn-00088D-BX for submit@debbugs.gnu.org; Wed, 29 Jul 2020 08:54:59 -0400 Received: from mail-ot1-f48.google.com ([209.85.210.48]:34324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0lbm-000880-2X for 42147@debbugs.gnu.org; Wed, 29 Jul 2020 08:54:58 -0400 Received: by mail-ot1-f48.google.com with SMTP id k12so577114otr.1 for <42147@debbugs.gnu.org>; Wed, 29 Jul 2020 05:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KpqKbRfhd14wMEMBnymxJrmvaDgFAgdJru3/h9SfQqs=; b=g1GWrLX3HyBTEA3//Mk14JK8oix60u9a9DIDhEHqvUIV35hbiDH9u5C632kLQ8VXje dEiRfBGU6kHG91PoBLO3ZPeWml4TBvIS95La0ZP91kb9YYoUelcsgpn4YIboIp6Rd1EP Uh43pJ27b6PAXdGgThfINwKSZxrM1xHjxZLOczP0ytWBKnlyvNIui2RzcWpNcxIPP5XN NJoEizpRhx37AMF0Vv1RDBtkrAk5HfP05bfYWASIgqO2pUcRq7qxpaWvIg3WQ9hXYfXZ dya3RZVlITEXB2g+G+59LjmasoCuu2GiAO5tVMXZ739RZ1fAEpwGAWa00NIqz2hDg9Od DGWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KpqKbRfhd14wMEMBnymxJrmvaDgFAgdJru3/h9SfQqs=; b=KcjtNVwlhPQwgj84atJAqS95Op6ri8L1SbPCtaEn7q8de1m7qRb7pd/7Kx+Fc75eWv NRLY4W5H7BKfGL8HQpEXC7vxsd5QiAvYOYrb8x+vvmsoF2en+HL9S/fha+Q7qPf/I81B lBcmgafwohmsNS7zmQ7Z/pH2GhA6oJxR4YBKrIUDLSm6Dq2j5UxijfzCFWptlZmd3Usy O7lEoV/KPBRA2NpDE/72JW41FnR5Izg2Qws0qVDM++qW1ItBuimN7BMQyWKCXS1E5dx/ b/z0p/52mO1S79ba4Y7pcjmI5Sqh19J3NftI51J0v5dD8Rr3NFsuYna2jwvRQyzEYG5n AlBA== X-Gm-Message-State: AOAM530twVRmzhhhi6ODkHh1mzDvo8rFaT9w9g619O1TzDdglyVrk3VP SmmHgqqU5v9fdaJxIFLa5meL5GEdsHBPnFnAVM4= X-Google-Smtp-Source: ABdhPJw+L/XliZ5Kc8mKEBsWCh3inNx1ytoS0hp5mArYNLYgg+jSV9zSdu+exZK1rsmOlZGN5TpNYEV6D07V32umED8= X-Received: by 2002:a9d:170c:: with SMTP id i12mr4051169ota.36.1596027292212; Wed, 29 Jul 2020 05:54:52 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> In-Reply-To: From: Philipp Stephani Date: Wed, 29 Jul 2020 14:53:55 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am So., 26. Juli 2020 um 00:27 Uhr schrieb Stefan Monnier : > > >> > There are also some functions declared 'pure' that appear to have side > >> > effects: kbd, package-get-version > >> > >> Which side-effects are you thinking of? > >> > > > > I wouldn't know about side effects, but `kbd' is definitely not pure > > by the "homomorphism w.r.t. eql" definition as it takes a string > > argument. > > Taking string arguments is not a problem (`eql` strings are also > `equal`). Only if the strings aren't modified between two invocations. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jul 2020 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159602824332741 (code B ref 42147); Wed, 29 Jul 2020 13:11:02 +0000 Received: (at 42147) by debbugs.gnu.org; 29 Jul 2020 13:10:43 +0000 Received: from localhost ([127.0.0.1]:60350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0lr0-0008W1-K2 for submit@debbugs.gnu.org; Wed, 29 Jul 2020 09:10:42 -0400 Received: from mail-ot1-f54.google.com ([209.85.210.54]:38242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0lqy-0008Vm-BZ for 42147@debbugs.gnu.org; Wed, 29 Jul 2020 09:10:40 -0400 Received: by mail-ot1-f54.google.com with SMTP id q9so1777702oth.5 for <42147@debbugs.gnu.org>; Wed, 29 Jul 2020 06:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=FqlPmPmvZ2DC0CjuEyMmaz2rTBOB/zLVWIG/S475y6k=; b=ren9zWm40PF+61tMmvcRScuSXf2WozvWuYz8wBD3tCzVgsZELlBuhw6VFoMT6oqVD1 1Bo0oOBCZga+NVE8bFz0ACwT/EC0WR+Ss3oXvq2lC6rb9NWFZiRsjhMe+ULcMnD34G9U LsNhirMRtqgybknWjVpnMwV3p1IdzKyFfybQc/lK7bedWKiFLDTM8Yvea3cuKZ3inp2A Vb6zqkOH865CkTAAw9lA4mYZTvDyNC1NJYqJn0YIoDqbl+zH6FEJ2yzm2tPzWpiueY79 jSTDupZ+TRKBTHS7UZ9/ZQbQl8vN2ZO6f31r5eLj7sOUiVB9IeeVN9037raB+8JZX8cP uLnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=FqlPmPmvZ2DC0CjuEyMmaz2rTBOB/zLVWIG/S475y6k=; b=Mx7ke057Eb7tWZvDdpnE6tx3wH2MY40bnXeJqJHW0Xx9ow4rMx7KfcZtLlT5K+A1tF ZF0bK9DQf/IFVjVF1E1Y5vwben8QkIS+FrAUZ8jdYQgtyVt+vl/r5G58tmVd/eKU98wE wpQhu+VKjFUX96OGwxvw3wuLzesE81DUx1cvusTRFG74CNQJUwR05HcW0I41ADUdwhha A7rkbZQcdcPI7aZGHU8U3Z+Hxb5o6oHkv4UzxGZ2sqg4UHsDgdYdYsUXbi/LTYQNeJg6 K9It2ntbf5/nNmOFxkJtJQif7MiDpXmzSOjE8GsjHKy96R7jMzvWbl4EGr6JiCvMXxgm hm/g== X-Gm-Message-State: AOAM532SsQ8YXThJtvk9u/yKPdMMDkjhLZKNjfa70Y/UM0J6+mUOKw4A 7CETZkbUdR0J/T0W+cLIzlIaYAQD/3m36KgR5GM= X-Google-Smtp-Source: ABdhPJwhcEH5By3aFsLqmlIU0Us+LooVW/wFDWpc7eJ6fdiV3NC5uJAUVcGhhQbOwstIbIM4buylia98i01sPtsRJdo= X-Received: by 2002:a9d:7995:: with SMTP id h21mr26325772otm.174.1596028234462; Wed, 29 Jul 2020 06:10:34 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> In-Reply-To: <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> From: Philipp Stephani Date: Wed, 29 Jul 2020 15:10:22 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am Sa., 25. Juli 2020 um 23:00 Uhr schrieb Mattias Engdeg=C3=A5rd : > > 25 juli 2020 kl. 22.11 skrev Philipp Stephani : > > > The manual states that > > "This function [concat] always constructs a new string that is not > > =E2=80=98eq=E2=80=99 to any existing string" so I don't see how it coul= d ever be pure. > > Actually that part of the manual was corrected fairly recently, as that s= tatement hasn't been true for decades. > > More to the point, the current set of functions marked as 'pure' are real= ly the superset 'pure-absent-mutation': functions that are pure when it can= be assumed that the arguments are not modified. This assumption can be bas= ed on physical immutability (integers), by convention (string constants), o= r anything else the compiler can prove such as control flow. > > There is also the question of what equality to use and here the answer is= probably 'equal' since we are only dealing with immutables. (The return va= lues of these functions cannot be considered mutable for obvious reasons, s= o make-string is out.) > > If you want to rename the property accordingly then I won't object. In an= y case, it is certainly a good idea to be precise about what the various se= ts really mean. It looks like these are really two separate concepts, which should be documented separately and should get separate function properties: - Fully-pure functions are guaranteed to either return results that are "eql" or signal error data that is "equal-including-properties" when given arguments that are pairwise "eql", for all possible arguments, mutable or not. - Pure-unless-mutable functions are a strict superset whose restrictions to immutable arguments are guaranteed to either return results or signal error data that are "equal-including-properties" when given arguments that are immutable and pairwise "equal-including-properties". Both categories must be free of observable side effects as well. > > There are also some functions declared 'pure' that appear to have side ef= fects: kbd, package-get-version > kbd can and should be made pure-unless-mutable at least. package-get-version should be neither, but should be marked using a third to-be-introduced property (e.g. "eval-when-compile") to state the intention without resorting to hacks. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jul 2020 14:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Stephani Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15960329248716 (code B ref 42147); Wed, 29 Jul 2020 14:29:01 +0000 Received: (at 42147) by debbugs.gnu.org; 29 Jul 2020 14:28:44 +0000 Received: from localhost ([127.0.0.1]:33449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0n4W-0002GW-1H for submit@debbugs.gnu.org; Wed, 29 Jul 2020 10:28:44 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0n4U-0002GL-LZ for 42147@debbugs.gnu.org; Wed, 29 Jul 2020 10:28:43 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4EDE0440918; Wed, 29 Jul 2020 10:28:37 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BAE54440771; Wed, 29 Jul 2020 10:28:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1596032911; bh=7SIqdEH21myh2iKhEMfcL4HeEarzOFK9SntjoEYAW4o=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XGcxQzgZNmZHj4MvPphEyycuWt5FarlyQptSV71QO2hCfyFR7W9b9Gz7RYhnVhaML odLb00W50+Q5bKNxnPRHjd0YEzoDlzdnmjfmW5vpPPdNZHeuZThCQNymDHj9CQRRfB 6z6eluEKaq4K+CsVTvgComlOVgW5/ZxRrFBv+AuIvjEA/kaoZoKFgAS8HDBIBTH1yf 2uDCtzVU3850XEImXSbvr8WK40frR/dTfQEXkKc5XTHI8jMMGkwDvpli3/LyhaMqIz /Sh0gLV0zpJx7MDaIAyL+RhMO4gneqnEAKWL6O3jGtmO9/bBigw2qlzE0d7bh3xuB5 gSmFe+uqERlGw== Received: from milanesa (unknown [45.72.246.108]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 33E82120225; Wed, 29 Jul 2020 10:28:31 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> Date: Wed, 29 Jul 2020 10:28:30 -0400 In-Reply-To: (Philipp Stephani's message of "Wed, 29 Jul 2020 14:53:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.012 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> > I wouldn't know about side effects, but `kbd' is definitely not pure >> > by the "homomorphism w.r.t. eql" definition as it takes a string >> > argument. >> Taking string arguments is not a problem (`eql` strings are also `equal`). > Only if the strings aren't modified between two invocations. Indeed, you're right. In practice this is not a problem, for all kinds of circumstantial reasons, but in theory you're quite right. Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jul 2020 16:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Philipp Stephani , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15960386321935 (code B ref 42147); Wed, 29 Jul 2020 16:04:01 +0000 Received: (at 42147) by debbugs.gnu.org; 29 Jul 2020 16:03:52 +0000 Received: from localhost ([127.0.0.1]:33529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0oYa-0000V8-A8 for submit@debbugs.gnu.org; Wed, 29 Jul 2020 12:03:52 -0400 Received: from mail1440c50.megamailservers.eu ([91.136.14.40]:40974 helo=mail264c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0oYX-0000Ut-JK for 42147@debbugs.gnu.org; Wed, 29 Jul 2020 12:03:51 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1596038612; bh=rpTYD5nFPYor5/qe6veLWT9JGhC0bJS0t1e0ucs+a38=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=KWU6/w5bWMtes5TF3qVDDHFpERSsBj6KmHUwxLWkfXlFf9T7ymGRIIidnGLV5hF4Q bZuZNpz89JBsdP3N5FFg0PiacOYUF47UzFLjShryzMgAPMAviu1AaWSiwCyMntgswj qsJh/8F2IWMg7dfv2hVir7XF7X3vgw71908V6qBU= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail264c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 06TG3R33028673; Wed, 29 Jul 2020 16:03:29 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: <81F989D1-3CC4-450B-89D6-E9C16F766277@acm.org> Date: Wed, 29 Jul 2020 18:03:27 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> <81F989D1-3CC4-450B-89D6-E9C16F766277@acm.org> X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F26.5F219DD4.0050:SCFSTAT68638221, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: -4.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PPNxBsiC c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=1fGeeg7bK_50pHgoSV4A:9 a=CjuIK1q_8ugA:10 X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> But yes, it's a problem because `C-h o kbd RET` says explicitly that it >> doesn't change the match data :-( > > Motivation enough for them to save the match data then. I pushed the save-match-data around 'kbd' since that one looked rather obvious. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >> But yes, it's a problem because `C-h o kbd RET` says explicitly that = it >> doesn't change the match data :-( >=20 > Motivation enough for them to save the match data then. I pushed the save-match-data around 'kbd' since that one looked rather = obvious. Regarding package-get-version: perhaps we should drop the 'pure' = property and just let callers wrap it in eval-when-compile? From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jul 2020 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Philipp Stephani , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159605520527528 (code B ref 42147); Wed, 29 Jul 2020 20:41:02 +0000 Received: (at 42147) by debbugs.gnu.org; 29 Jul 2020 20:40:05 +0000 Received: from localhost ([127.0.0.1]:33818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0srt-00079w-1I for submit@debbugs.gnu.org; Wed, 29 Jul 2020 16:40:05 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0sro-00079J-A7 for 42147@debbugs.gnu.org; Wed, 29 Jul 2020 16:40:03 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8423180F4E; Wed, 29 Jul 2020 16:39:54 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 13CCF808C6; Wed, 29 Jul 2020 16:39:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1596055193; bh=He5M9aRvL9yQ77hIe38n57jfgh0VCd3rtablE04f+Uw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CcFB98/qw5jDRTUu/M3hFhP8j+nEE4Tydn3wJzNU4lwKCGAkB8wX1i/wUJkWZuMjf Bq5kQJlurT4KB5FA7J56JqMIYYmDRj2U4sHeeYYDLEHh1YdkppOohbE4OLz/YnEM5v 9m6z+SGdDksKPWx6eDzgB4XKMHx7r+60wkXjK7zuZkbsVQ5MA7FvXvmYd0X2j0EPkH kxBV+A+XFJstY4Wi9Vu0TCDSZz0azCpEI/rfY583ZrXsIxYFv9zDQVRLEyN3o5aIT+ 5Ow52sqedN6QO1J+Rcj8ZYRhkkrmb8OgOC+K64s2Eau25lWFQdFtLD5XwxgSvWM76O bseN5ZehrrarQ== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E6FD41204BD; Wed, 29 Jul 2020 16:39:52 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> <81F989D1-3CC4-450B-89D6-E9C16F766277@acm.org> Date: Wed, 29 Jul 2020 16:39:52 -0400 In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Wed, 29 Jul 2020 18:03:27 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.032 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Regarding package-get-version: perhaps we should drop the 'pure' property > and just let callers wrap it in eval-when-compile? I'd rather not: the benefit is too subtle, I'd expect most users won't know/bother to use `eval-when-compile` around it even though I'd expect a vast majority of the uses can benefit from compile-time evaluation. In contrast the cases where the impurity will get in the way should be rare. Feel free to add a `save-match-data` if you think it's worth the trouble (but please include a comment explaining it's only there in order to satisfy the `pure` annotation). Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Aug 2020 15:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Philipp Stephani , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15964672797520 (code B ref 42147); Mon, 03 Aug 2020 15:08:02 +0000 Received: (at 42147) by debbugs.gnu.org; 3 Aug 2020 15:07:59 +0000 Received: from localhost ([127.0.0.1]:45864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2c4F-0001xD-Hm for submit@debbugs.gnu.org; Mon, 03 Aug 2020 11:07:59 -0400 Received: from mail172c50.megamailservers.eu ([91.136.10.182]:58470 helo=mail33c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2c4B-0001wz-38 for 42147@debbugs.gnu.org; Mon, 03 Aug 2020 11:07:57 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1596467263; bh=4jwxYuyk70hNN68xUr9WS5t84n1TzuolTBZrnpeork8=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=HXvt9AFp6w0W8Kajgf5Buzn0hgXTGbjJVjsdcU82mmsYx2e4gsARsY0jR2ckp5VcD 0loNm89pJj9jhjlQ9dOT1Wf/eEAHjQk9P0ViOg0YfxbPE9/uXNbwLwdoIwzPJCZVUC 5D88k201QVEaFCd9sBdOC0fGrXrDW902zt96MKao= Feedback-ID: mattiase@acm.or Received: from [192.168.0.4] (c188-150-171-71.bredband.comhem.se [188.150.171.71]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 073F7ZiS028813; Mon, 3 Aug 2020 15:07:38 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= In-Reply-To: Date: Mon, 3 Aug 2020 17:07:35 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <8371B1E5-F7DE-4CD6-977D-3D31B194C838@acm.org> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> <81F989D1-3CC4-450B-89D6-E9C16F766277@acm.org> X-Mailer: Apple Mail (2.3445.104.15) X-CTCH-RefID: str=0001.0A782F21.5F28283C.003F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=eaJDgIMH c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=iRZporoAAAAA:8 a=QO_HSIPmQ0wanQLc-skA:9 a=CjuIK1q_8ugA:10 a=NOBgFS-JBQ2l-kSd6-zu:22 X-Origin-Country: SE X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 29 juli 2020 kl. 22.39 skrev Stefan Monnier : >=20 >> Regarding package-get-version: perhaps we should drop the 'pure' = property >> and just let callers wrap it in eval-when-compile? >=20 > I'd rather not: the benefit is too subtle, I'd expect most users won't > know/bother to use `eval-when-compile` around it even though I'd = expect > a vast majority of the uses can benefit from compile-time evaluation. > In contrast the cases where the impurity will get in the way > should be rare. Feel free to add a `save-match-data` if you think = it's > worth the trouble (but please include a comment explaining it's only > there in order to satisfy the `pure` annotation). Thank you, I'll let you make the decision since you introduced the = function. Another possibility would be to turn it into a macro again (or = more likely a macro that calls a function at compile-time), or use = define-inline. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Aug 2020 13:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Cc: Paul Eggert , Stefan Monnier , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159706679115758 (code B ref 42147); Mon, 10 Aug 2020 13:40:01 +0000 Received: (at 42147) by debbugs.gnu.org; 10 Aug 2020 13:39:51 +0000 Received: from localhost ([127.0.0.1]:34975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k581m-000466-KB for submit@debbugs.gnu.org; Mon, 10 Aug 2020 09:39:50 -0400 Received: from mail-ot1-f53.google.com ([209.85.210.53]:46459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k581l-00045r-Vb for 42147@debbugs.gnu.org; Mon, 10 Aug 2020 09:39:50 -0400 Received: by mail-ot1-f53.google.com with SMTP id v6so7241167ota.13 for <42147@debbugs.gnu.org>; Mon, 10 Aug 2020 06:39:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=KHo7EZUmP0zQyW9/hTZK91Kr84ERqSTXdOerElLkq/E=; b=sUJ8Pd8t1+/1NKyFWSRyQH2LKBlgXx/lQAM70y6KF7bLe1bbncSig2BdeNEuF3XYs3 w31jvE5TA4ATazSrgJL1IVzbkvTRQvDVF7FYrQb836lufmDxqNLqMNS9IPcqMZV4FpiN lZq82c9C3fCxWFfSQfuE+d/wEGcytKssDHS/Lh6dQ7UIds0OKBemKEBHE2gxHVFS5FCk hWeiENgOdrrzAP6xRIMIkRiREDi67eC7FAE/R8AKldcYwx2cnfnsiGoVWuzXv9hVs+eW g309Mb+2ZpCCW3uJbkHC441aVhLDK7fa8bZVUwSY9Y41DmwVcNx2Na1LmX7xAVm1UE2P cZmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=KHo7EZUmP0zQyW9/hTZK91Kr84ERqSTXdOerElLkq/E=; b=VoHAHghMzRtk9w1GHsNuzRWvSkK4NMY9wqK0zYC/SKGRq7rH5ZQ5D/siexz8ublsZa caKq33X9TEmNkuUjdWJObb/lURo0GWlOOUqL9wSQEXjDpnkFkzWhvBCoPlKrrYpzWF1L UFI59SHngJPOOqiLuEGcX8Vs0IOlAP+Me9tvz0do68+FuAGEIFzdMj7v+R6+NlJPb8Hv a5HoF7xU9UD+mTYxkgN7Ew5mOLveIzuoSDOPeOCIK+edGPG6Pm7SwfqBHm3HsFxrkhTJ OfM4QFML5lb8jP3K2b/cMQqr/h1yKc16A6jcaES4MhGzbZDo6/JhMkGHHiB/oFRISx+l FjWA== X-Gm-Message-State: AOAM531258897j8TxgdJF6lgWn9dv3B+anl9RakSQ6elH7tayMCVN/Wu ec/XfMWSslrvsst+QjnN5xRTyvyUO4PcOmZAEzg= X-Google-Smtp-Source: ABdhPJwglbyNSKiYViPrWue2RSdvmdOlWXvEHDTc95Rw5+UroMnqX46z5fC1lWefy4azWn8fXV680WOn96op46lYeeI= X-Received: by 2002:a05:6830:4032:: with SMTP id i18mr775407ots.174.1597066784128; Mon, 10 Aug 2020 06:39:44 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> <81F989D1-3CC4-450B-89D6-E9C16F766277@acm.org> <8371B1E5-F7DE-4CD6-977D-3D31B194C838@acm.org> In-Reply-To: <8371B1E5-F7DE-4CD6-977D-3D31B194C838@acm.org> From: Philipp Stephani Date: Mon, 10 Aug 2020 15:39:32 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am Mo., 3. Aug. 2020 um 17:07 Uhr schrieb Mattias Engdeg=C3=A5rd : > > 29 juli 2020 kl. 22.39 skrev Stefan Monnier : > > > >> Regarding package-get-version: perhaps we should drop the 'pure' prope= rty > >> and just let callers wrap it in eval-when-compile? > > > > I'd rather not: the benefit is too subtle, I'd expect most users won't > > know/bother to use `eval-when-compile` around it even though I'd expect > > a vast majority of the uses can benefit from compile-time evaluation. > > In contrast the cases where the impurity will get in the way > > should be rare. Feel free to add a `save-match-data` if you think it's > > worth the trouble (but please include a comment explaining it's only > > there in order to satisfy the `pure` annotation). > > Thank you, I'll let you make the decision since you introduced the functi= on. Another possibility would be to turn it into a macro again (or more lik= ely a macro that calls a function at compile-time), or use define-inline. > Another option would be to create a separate function property (such as `eval-when-compile' or `force-inline') that would force the byte compiler to inline each call, as if surrounded by `eval-when-compile'. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Aug 2020 13:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159706698716086 (code B ref 42147); Mon, 10 Aug 2020 13:44:02 +0000 Received: (at 42147) by debbugs.gnu.org; 10 Aug 2020 13:43:07 +0000 Received: from localhost ([127.0.0.1]:34982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k584x-0004BN-72 for submit@debbugs.gnu.org; Mon, 10 Aug 2020 09:43:07 -0400 Received: from mail-oo1-f66.google.com ([209.85.161.66]:43271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k584w-0004Au-3V for 42147@debbugs.gnu.org; Mon, 10 Aug 2020 09:43:06 -0400 Received: by mail-oo1-f66.google.com with SMTP id z10so1883056ooi.10 for <42147@debbugs.gnu.org>; Mon, 10 Aug 2020 06:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+Rf0SBEY8pLvAjUaJm0c1wU3QZABpFMNOni6wHgHZgw=; b=mefA3W1pM3bDbCHOZ2hTvHXT4PhPody0EGcI6B+My1hR18nQfpOBTHH1JieQUxUwK1 mkQugX/5Be55I/JjP3v57cVuz71IdMkXNA56DfxVmNWN7oZa9moP/bllETEAim5NHOwr NNS6p0yhGID8H18e1FZ/PXBzpndepJiTe3poW+gV6FMm/DsvyiRLJWPhA8P5pXspi7Pb Rclifn0PpKJ27XEPk4xSI9UMRzHORX4bsDpUWjSnXnRHWzNSfdtX0oHOMKj7Q7PYEr/d fQuOuPpew+WAuwvQNpABYmAEdppz5MLhG/2uA6QpNSgQQi4pa8Sa9fGnlsLvvClSO845 unNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+Rf0SBEY8pLvAjUaJm0c1wU3QZABpFMNOni6wHgHZgw=; b=jBwZb9di4suyUPhXFxFhIJbUyPyhQyv5+CIHXXj25qmxHK4Wsb721cM8ooWApL8tfp HZRxxcnTdn2MDlhLmxSQIQrZIY+wzrDmhKx27WzKQbpvUB0rLAfV6OXrlzxAb2IB3p+0 sw1KUzKznll/cX6NPKti+dKXLOwsL4YP/mExkh7CRi/raW5TQCrBgYiow6Wvr1o1EyG6 Cj5hqPm3eZ7vws0rSE9kBNNink8aMMVpMvmtcLpca5SCL38gjDBf30kNJJrSoVCGOW4Z MgmYEGyRDylc+q5WMtGTIJRmNlFGqg8tPJrdD2AWOoflb7+NsR7X8UHfxX4kgUtvVokN BADA== X-Gm-Message-State: AOAM530w6EtRwT/rrgl/Hmvc36Heq15l/Oc+bZXMzILWw3EZhPkMZc1V kIkGjTqMQ9vIAzRMwc46InM4jermbdRYHetYAAo= X-Google-Smtp-Source: ABdhPJzGS7tQyvSG6lz2ISbdk/83ALLvPkaIyvElAiN0d7Psx9zQvk7pWn1ziP3RfxGiRRnc3zfiLGiHm+w8oaOySLA= X-Received: by 2002:a4a:9c0f:: with SMTP id y15mr893183ooj.81.1597066980389; Mon, 10 Aug 2020 06:43:00 -0700 (PDT) MIME-Version: 1.0 References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> <81F989D1-3CC4-450B-89D6-E9C16F766277@acm.org> In-Reply-To: From: Philipp Stephani Date: Mon, 10 Aug 2020 15:42:48 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Am Mi., 29. Juli 2020 um 22:39 Uhr schrieb Stefan Monnier : > > > Regarding package-get-version: perhaps we should drop the 'pure' property > > and just let callers wrap it in eval-when-compile? > > I'd rather not: the benefit is too subtle, I'd expect most users won't > know/bother to use `eval-when-compile` around it even though I'd expect > a vast majority of the uses can benefit from compile-time evaluation. > In contrast the cases where the impurity will get in the way > should be rare. Arguments relating to probabilities ("most users", "vast majority", "rare") don't really apply here, as the discussion is about correctness. A pure function must be pure 100% of the time, no exceptions allowed. `package-get-version' can't possibly be pure: it doesn't take any argument, so if it were pure, it would have to return a constant in the mathematical sense. From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Aug 2020 22:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Stephani Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15970972621472 (code B ref 42147); Mon, 10 Aug 2020 22:08:01 +0000 Received: (at 42147) by debbugs.gnu.org; 10 Aug 2020 22:07:42 +0000 Received: from localhost ([127.0.0.1]:37765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5FxF-0000Ng-T0 for submit@debbugs.gnu.org; Mon, 10 Aug 2020 18:07:42 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5FxC-0000NU-5k for 42147@debbugs.gnu.org; Mon, 10 Aug 2020 18:07:40 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 635D04410B8; Mon, 10 Aug 2020 18:07:32 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F166F441020; Mon, 10 Aug 2020 18:07:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1597097250; bh=9dWVRtIrtEaIyVljNOvOBeHMgN8uGgINcp5fcFyoEac=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=WDlzDCVCf8yVJDtXsuevNfPxsVCIddjA/zORZlqF/NIIdpc0HBVWqQt3DyBBJR0xi 6OVsFVPmdQ+GPr1kYxuyKd7TUrk6mQRefjdgsJEfXfslcQbt5JkdTslGaXZyWZaQ5f vXp8d+s/Ug8PA4gP2rgyTTeEJ/NSlgPI5Lv5OpXMETGGJ8z8cBaLkKfW46VthxPseI WgidOG7NQtnFl0DaFcCsXJprF8T9J3PtWsrr3TEUJYWRqawKgTtMKKsGPJsteRPbot VyMwJGgAv3XZl93OnFHlZBB14G+ocsNaoUdNkHx2lpA5ZMucadhOAMFefby9Owez+z 51EXfdCH/hjzg== Received: from milanesa (unknown [45.72.246.108]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 98D7D120500; Mon, 10 Aug 2020 18:07:30 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> <81F989D1-3CC4-450B-89D6-E9C16F766277@acm.org> <8371B1E5-F7DE-4CD6-977D-3D31B194C838@acm.org> Date: Mon, 10 Aug 2020 18:07:29 -0400 In-Reply-To: (Philipp Stephani's message of "Mon, 10 Aug 2020 15:39:32 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.009 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Another option would be to create a separate function property (such > as `eval-when-compile' or `force-inline') that would force the byte > compiler to inline each call, as if surrounded by `eval-when-compile'. It can't always be done, so I think from that point of view what we have is fine, the only problem is that we don't have a way to say "this can be considered as pure by the compiler" without also saying "this doesn't change the march-data". So maybe a new value of `pure` is in order? Stefan From unknown Tue Jun 17 22:26:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Aug 2020 22:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Stephani Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147@debbugs.gnu.org Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15970974491751 (code B ref 42147); Mon, 10 Aug 2020 22:11:01 +0000 Received: (at 42147) by debbugs.gnu.org; 10 Aug 2020 22:10:49 +0000 Received: from localhost ([127.0.0.1]:37769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5G0H-0000SA-Eh for submit@debbugs.gnu.org; Mon, 10 Aug 2020 18:10:49 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5G0F-0000Rx-JZ for 42147@debbugs.gnu.org; Mon, 10 Aug 2020 18:10:48 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 518D04410B8; Mon, 10 Aug 2020 18:10:42 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id ED9A0441020; Mon, 10 Aug 2020 18:10:40 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1597097440; bh=jzDgh1RbD5cOCdD8RGeXwMTGC1z27uakeBg/6be/2Zw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QrDQ2ZeQtoWofEGMHccPNZ3yBEhG3tpDr85YfLmoXwB/jRXzbfexXqR/F5NckgXU6 FC+nBsBD/gJBtuOWhMOqR9C+UHnxpOf5xt8YlleUIkd9VJtymUXzr0P0UmkuGB6Qoz PB2Ry/PYIpYSnsKRi79DZQqITfW6fVqhqz1VBtFXD4BvmjLDNPn3YY4lLZlpTT2lF/ yMk0omz20/cREnQkudS/KVAO85VM+t6qMASZZ1ob4l8jtIzC9IS5TSYPIjWxpHU3sV 9Xuk44phIfnx1vBAkMPTKmgS2Yk6k+xPRW+OAIM8DFa3o97kxFG2qE1ruG/wMr3O9G 9mvgr5P+o3cWA== Received: from milanesa (unknown [45.72.246.108]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 83CE312078C; Mon, 10 Aug 2020 18:10:40 -0400 (EDT) From: Stefan Monnier Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <33C2E2C8-16A6-47A9-B3A4-8A5F43648E04@acm.org> <51FE77F3-CA05-459A-9601-9E1EEBC1E2FE@acm.org> <1213DD41-01F9-4605-8D32-D750B6CE2B35@acm.org> <81F989D1-3CC4-450B-89D6-E9C16F766277@acm.org> Date: Mon, 10 Aug 2020 18:10:39 -0400 In-Reply-To: (Philipp Stephani's message of "Mon, 10 Aug 2020 15:42:48 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.009 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Arguments relating to probabilities ("most users", "vast majority", > "rare") don't really apply here, as the discussion is about > correctness. A pure function must be pure 100% of the time, no > exceptions allowed. `package-get-version' can't possibly be pure: it > doesn't take any argument, so if it were pure, it would have to return > a constant in the mathematical sense. It's a borderline case: it's designed such that if the compiler pre-evaluates it, the result will indeed be the same as if it were evaluated later at run-time. So it's correct w.r.t "allow constant-folding", even tho it's not "pure". Stefan