From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Date: Wed, 1 Jul 2020 21:31:31 +0000 (UTC) Message-ID: <1621669100.2102667.1593639091621@mail.yahoo.com> References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8961"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Paul Eggert , Stefan Monnier , 42147@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 01 23:32:19 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqkL5-0002Di-Gn for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 23:32:19 +0200 Original-Received: from localhost ([::1]:44808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqkL3-0004IO-VF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 17:32:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqkKo-0004IB-T4 for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 17:32:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42273) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqkKo-0003P4-Jj for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 17:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jqkKo-0004rN-FD for bug-gnu-emacs@gnu.org; Wed, 01 Jul 2020 17:32:02 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.159363911718670 (code B ref 42147); Wed, 01 Jul 2020 21:32:02 +0000 Original-Received: (at 42147) by debbugs.gnu.org; 1 Jul 2020 21:31:57 +0000 Original-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 Original-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/wCRyMZt9y0B9qwPtPUwsOTzLFXYSxdih90bhuwjW25407M2j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oJ.dHdYyOXBtVta9Tq2StcDCYhudyFVsjUuUFVPF7 _svbywrUmG5Fm8iK6gyd572Iu46iYe4h6XTmNQduxF Original-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 In-Reply-To: <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182620 Archived-At: 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