From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#70077: An easier way to track buffer changes Date: Thu, 04 Apr 2024 17:58:43 +0000 Message-ID: <87frw1t3fw.fsf@localhost> References: <86frw8ewk9.fsf@gnu.org> <86cyrcdy80.fsf@gnu.org> <877chh8fjk.fsf@localhost> <87wmpfsv2y.fsf@localhost> <87ttkjspkq.fsf@localhost> <8734s2pqu0.fsf@localhost> 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="11191"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, 70077@debbugs.gnu.org, qhong@alum.mit.edu, frederic.bour@lakaban.net, joaotavora@gmail.com, mail@nicolasgoaziou.fr, acm@muc.de, Eli Zaretskii , stephen_leake@stephe-leake.org, alan.zimm@gmail.com, phillip.lord@russet.org.uk To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 04 19:59:20 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 1rsRMu-0002e9-6K for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Apr 2024 19:59:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsRMZ-0007fU-DC; Thu, 04 Apr 2024 13:58:59 -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 1rsRMX-0007eE-AN for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 13:58:57 -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 1rsRMX-0007My-27 for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 13:58:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsRMb-0003dj-Od for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 13:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Apr 2024 17:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70077-submit@debbugs.gnu.org id=B70077.171225352313965 (code B ref 70077); Thu, 04 Apr 2024 17:59:01 +0000 Original-Received: (at 70077) by debbugs.gnu.org; 4 Apr 2024 17:58:43 +0000 Original-Received: from localhost ([127.0.0.1]:34681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsRMJ-0003dA-DU for submit@debbugs.gnu.org; Thu, 04 Apr 2024 13:58:43 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:35925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsRMF-0003cm-RT for 70077@debbugs.gnu.org; Thu, 04 Apr 2024 13:58:42 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id DC37124002A for <70077@debbugs.gnu.org>; Thu, 4 Apr 2024 19:58:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712253508; bh=LjJ6XTN/1S5DHovyKjjogMsgzDn0Gj9/0CCWnmp7jYk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=ABK15oYEwPbBH29hcjPk/QxCtzKWOPAQY/2iLtnWa/l3l2HpVCGNlz0dsVuNj+zoq G+RT9AAGV4up2OOG2PUAbg8/ZCEV0OBdpy8RNA+DdEUO5T3aiBk9VU+p1mZKJbX6tn PCDn4ugJvyqat1VvrbObYCX81jRohlXHAdShy6wAZhcaVgrS7luc5neyZVkjMAz0nX rYbyvp+FwGGI1B52VXnhzo31Pz5gTFNwa69Mya3a53yOvlSZwjl36EdoKxkEpsjQfJ NGJkhOC5rLIza8FUSP7+aLhEvknTp4JSYZNGR/z5m3RsZEyKM+CPQSMtDr40MyjvSr ixdni0ACMWjeg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V9Tr25R3Bz9rxP; Thu, 4 Apr 2024 19:58:26 +0200 (CEST) In-Reply-To: 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:282674 Archived-At: Stefan Monnier writes: >> I am not 100% where the O(N^2) is coming from. > > If you add N times 1 char to an (initially empty) string, the total cost > of constructing the resulting N-char string is O(N=C2=B2). I guess that another approach is not concatenating the strings and instead accumulating them into a list (or two lists - before/after). That will get rid of logN multiplier :) --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at