From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70784: Abolish string resizing Date: Sun, 05 May 2024 22:41:54 -0400 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11644"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 70784@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 06 04:42:59 2024 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 1s3oJe-0002pm-RA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 May 2024 04:42:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3oJM-0000Pu-LL; Sun, 05 May 2024 22:42:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3oJK-0000Pg-Hf for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 22:42:38 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3oJK-0007U3-9X for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 22:42:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3oJh-0002Xo-T3 for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 22:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2024 02:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70784 X-GNU-PR-Package: emacs Original-Received: via spool by 70784-submit@debbugs.gnu.org id=B70784.17149633559770 (code B ref 70784); Mon, 06 May 2024 02:43:01 +0000 Original-Received: (at 70784) by debbugs.gnu.org; 6 May 2024 02:42:35 +0000 Original-Received: from localhost ([127.0.0.1]:35049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3oJG-0002XW-WB for submit@debbugs.gnu.org; Sun, 05 May 2024 22:42:35 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3oJB-0002XL-3O for 70784@debbugs.gnu.org; Sun, 05 May 2024 22:42:32 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7BC13809C1; Sun, 5 May 2024 22:41:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1714963316; bh=lgPS3QSTYH75ghgfF0kb2aRhqzB2zfWqKPGY6NmCtrs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=C8xso79/Ivn+flnpg46mrh1J50I8TX6bR/iAwlTtoQyeFQchsfqJWZ7lguj3sHyMp ORevXkzlqqe1cr/nlcZwydL2hupLkIToqKdwQK01PfTv/YRxkPUb8iHja5/k34xEkq hD3aHdVJnrEwkgiJkLa9M6mgaRb+LMI6AfE8rnfP1Uy1euCtJZRQA/SbBT27Oeq56m zOieBknqxA13QGsOqESX89uJoBSt18DFZSvQ95RjEub5Tv62uXGRB/XL6Boo9euKzm tvvxHkWr6mgTI6mcFhmKlgQBWHHfFKbnW8hgt1Bb/99o7KnB6UfKj6TiO2RbYGT01w Xgs8g2AcXpSRw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DA22880191; Sun, 5 May 2024 22:41:56 -0400 (EDT) Original-Received: from pastel (unknown [45.72.201.215]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id ACD6812067F; Sun, 5 May 2024 22:41:56 -0400 (EDT) In-Reply-To: (Po Lu's message of "Mon, 06 May 2024 08:53:17 +0800") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284553 Archived-At: >> The Elisp ability to resize strings is high-cost, low-benefit, so we >> should abolish it. > What is the improvement to be had by "abolishing" this immemorial > feature? Actually, it's not "immemorial", it's just old: commit 3c9de1afcde82a99137721436c822059cce79b5b Author: Kenichi Handa Date: Fri Jul 21 06:45:30 2000 +0000 (Faset): Allow storing any multibyte character in a string. Convert unibyte string to multibyte if necessary. IOW, since Emacs-21.1. As for improvements, like a lot of refactoring and maintenance work, there isn't any immediate benefit. But it's a "feature" which is *very* rarely used (thank god: it makes a notionally constant time operation take time proportional to the size of the string, so if it were used often we would have heard complaints about the poor performance) and which imposes pretty significant implementation constraints, so it's definitely detrimental to long term evolution. Stefan