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: Thu, 09 Jul 2020 12:57:15 +0000 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> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20922"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Paul Eggert , Andrea Corallo , 42147-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 09 14:58:17 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 1jtW7z-0005LW-Nu for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jul 2020 14:58:15 +0200 Original-Received: from localhost ([::1]:50920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtW7y-00057q-Qb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jul 2020 08:58:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtW7n-00057j-Nj for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 08:58:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtW7m-00070D-Ce for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 08:58:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtW7m-0006vs-9Y for bug-gnu-emacs@gnu.org; Thu, 09 Jul 2020 08:58: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: 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 Original-Received: via spool by 42147-done@debbugs.gnu.org id=D42147.159429944626602 (code D ref 42147); Thu, 09 Jul 2020 12:58:02 +0000 Original-Received: (at 42147-done) by debbugs.gnu.org; 9 Jul 2020 12:57:26 +0000 Original-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 Original-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 Original-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 In-Reply-To: (Stefan Monnier's message of "Thu, 09 Jul 2020 08:47:03 -0400") 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:182862 Archived-At: 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