GNU bug report logs - #77924
31.0.50; [Feature branch] Change marker implementation

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Gerd Möllmann <gerd.moellmann@HIDDEN>; dated Sat, 19 Apr 2025 16:06:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 23 Apr 2025 13:27:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 23 09:27:07 2025
Received: from localhost ([127.0.0.1]:55689 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u7a81-0005RB-EE
	for submit <at> debbugs.gnu.org; Wed, 23 Apr 2025 09:27:07 -0400
Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:44306)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u7a7x-0005PE-On
 for 77924 <at> debbugs.gnu.org; Wed, 23 Apr 2025 09:27:03 -0400
Received: by mail-wr1-x431.google.com with SMTP id
 ffacd0b85a97d-39efc1365e4so2421213f8f.1
 for <77924 <at> debbugs.gnu.org>; Wed, 23 Apr 2025 06:27:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745414815; x=1746019615; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=PmD3mVRvObB78SVM+3LgMUXgPDydYty2hzJoXX0iVhw=;
 b=Lybm9aOIrvoCqT7qfors4LsquHWJDJcBF+jXLx1q7EZtVXNs1G4/BHUG2v6Najaemo
 Jg88aNrFF76EM7wCVwzqcp32aG1EjcfeABlFiRZcIObi7cDjc/mtJwENQ6w/FrXMu77z
 /OYTfIP1Xh6ReKHlBIGDkclSCAfPfg0TPyxwxdX5oa7HVMiUrK4We8/cgVkNkVQl5nC2
 gU94AqL51P7T+RJ6ulJ4+tLb91Z5D1XGDOmeN6tgp6a3xBHcjH4lTRx74PvsXoW9o/aF
 L4lLeDXk7oBuKwXnK5Rm8l5SyMNeqQVaWjR+0iBjlwJp0I/2NVfrYJYsHK9Z2SyD9CBv
 CvYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745414815; x=1746019615;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=PmD3mVRvObB78SVM+3LgMUXgPDydYty2hzJoXX0iVhw=;
 b=l6t2baaGNclysOvDC37rcYYC3V9GzH7z4fpQx7NE89N6eEnTij2mFxg+z5ogv7ALOG
 KQTtutMP65FXyuXD8Q+odxL2Ou0oOWhnM0bTrjwiVKd43mXEzfJm6d2/idfl40Alfb9q
 FfYFb4sKO/uKH23/PLFFdchY7NW/AML3eZal/Gi6lRhK2ouKkw9l3kjqfNfuq8uuN6dE
 NKHyNRd5sw9eO79Xn44MajUok4bFrGGV+iHR7Xwn71pp4mqMIgutdvOUGYxkJF5trHcS
 Rhj8dEiC3Rm6cZooQrIbYXbZUjIAQs+b25zJ1jID+/XfVqkzMbHBAVDnGu4gtndinf0u
 CBsQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCUUYNYUKkIzn+mI4W3QTrfmCFcVKXZLFYwyri3WFJQdKvsbe+yOtJuNKE/dLBioOoLRTaUSyg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YxTontJ0M2E38EgmxmxM0CeuDYDknyAV3Kxhvva17VaQgn12YGZ
 4Fz1CqXRLSZfa6oX6hLkhfxR1+AXehrhfE0vUOYk/AzAzEauKtuFzyhlLV3v
X-Gm-Gg: ASbGnctXKJcNiTAAZqFNz0xpRor3x4C7PodanGzQg/OYBuIoGRP40JwYyS4F2OvVt/Y
 xXwGX93ldmU7vBdwqqnWfrq2qjublRx06PB2IeG2XgiA8k083ZkTXElfGzUOFrikVxnpebFZKED
 fb2Qnm2bnF62QAR1vCYc+76gv9vOvSVWp6GhnYIJbd34ApJ/NxjAXT97DX+TYjcZe/WjmuYUi8B
 hkX8md2QkM3oplxXSmM3D/IUNQFOC6LyO5+Z0lpr3wz5yMNe+pBwCxO71nIoP4Wy/Wk0qeSa604
 fV4QSMmXmm8j9ALSeNZ/zbA4f68sKjsrcKZ4fS00pXkufu3BIXuimS2Cl6lyS0ZqPZsC66AYjlB
 O1ufVkN7o1/LNOapYNrtU6pPSgIisdQKj1DmtYOGHocfqizejYw==
X-Google-Smtp-Source: AGHT+IGBNMy8jVN/yO+QdXSbKI2z1MeNKX56kAuHrZwcxny3TCoFQ4TI6oQY3B8OFmV4vhDuzKieuQ==
X-Received: by 2002:a5d:5983:0:b0:39f:ed8:d6c2 with SMTP id
 ffacd0b85a97d-39f0ed8d6e0mr6838542f8f.4.1745414815082; 
 Wed, 23 Apr 2025 06:26:55 -0700 (PDT)
Received: from pro2 (p200300e0b7376d00808a7ba45869fd57.dip0.t-ipconnect.de.
 [2003:e0:b737:6d00:808a:7ba4:5869:fd57])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-39efa4207dbsm18632846f8f.4.2025.04.23.06.26.54
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 23 Apr 2025 06:26:54 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <861ptj10kb.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN>
 <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
 <m27c3cesxb.fsf@HIDDEN> <jwvzfg8493r.fsf-monnier+emacs@HIDDEN>
 <m234e0xo35.fsf@HIDDEN> <m2frhzbi1y.fsf@HIDDEN>
 <861ptj10kb.fsf@HIDDEN>
Date: Wed, 23 Apr 2025 15:26:53 +0200
Message-ID: <m2zfg7nh42.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: monnier@HIDDEN, 77924 <at> debbugs.gnu.org, stefankangas@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> My assumption up to a few minutes ago was that that procedure has
>> changed
>
> It hasn't changed.
>
> Some people like to rebase, others dislike rebasing.  (Full
> disclosure: I'm in the latter camp.) 

(I'm in the same camp.)

> Since we decided not to care either way, we don't request contributors
> to do it one way or the other: they can do it however they like, and
> we will accept that regardless.

Thanks for the clarification!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 23 Apr 2025 13:15:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 23 09:15:43 2025
Received: from localhost ([127.0.0.1]:55626 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u7Zx0-0003Cl-WD
	for submit <at> debbugs.gnu.org; Wed, 23 Apr 2025 09:15:43 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47234)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u7Zww-0003B3-Eb
 for 77924 <at> debbugs.gnu.org; Wed, 23 Apr 2025 09:15:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u7Zwq-0001EJ-RG; Wed, 23 Apr 2025 09:15:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=EW7N0whvSk//RvU/7mra9CyHBNCX9lr7CoGL2JuOJc8=; b=DyebpIfnBCscR5gC9Z4h
 aoCDsocExxifa4NDG+XbH5+rBLIaTYJl742V43eke9zfxnmVSMJJ4MaiXxAwA2JsTJEDLKX2g7mjO
 Sd6difj7WjyMJewTkXdFIV9zZe2VmmOnogmQKhFx7mqMqfMhvKJNiHilxW1k3Mh5P9hy4bQXVcwoe
 LLpx1EGY+c5AfpB/ehOlegi5s1AIpzad2begGSs0uWDj3HzVyj6zsvBmQ2WBgXntjGQqcZZO6Vlom
 dk7xPY31k4UdvyI12bJPb+oMpCVsQAZbEz953V98W4yUBWyu9bhCrVlyQe1CdjlhOoz94v0odQ/F4
 /gzu35F4hNYzog==;
Date: Wed, 23 Apr 2025 16:15:16 +0300
Message-Id: <861ptj10kb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gerd =?utf-8?Q?M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
In-Reply-To: <m2frhzbi1y.fsf@HIDDEN> (message from Gerd =?utf-8?Q?M?=
 =?utf-8?Q?=C3=B6llmann?= on Wed, 23 Apr 2025 06:47:21 +0200)
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
References: <m2jz7gp25p.fsf@HIDDEN>
 <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
 <m27c3cesxb.fsf@HIDDEN> <jwvzfg8493r.fsf-monnier+emacs@HIDDEN>
 <m234e0xo35.fsf@HIDDEN> <m2frhzbi1y.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77924
Cc: monnier@HIDDEN, 77924 <at> debbugs.gnu.org, stefankangas@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Stefan Kangas <stefankangas@HIDDEN>, 77924 <at> debbugs.gnu.org
> From: Gerd Möllmann <gerd.moellmann@HIDDEN>
> Date: Wed, 23 Apr 2025 06:47:21 +0200
> 
> Gerd Möllmann <gerd.moellmann@HIDDEN> writes:
> 
> >>>> PS. BTW, a small procedural thing.  Instead of merging master into a
> >>>>     scratch/ branch, I recommend deleting the branch, rebasing it on
> >>>>     master, and then pushing it again.  This way, when we later merge it
> >>>>     into master, we avoid the merge commits, and the history is kept
> >>>>     clean and more easily reviewable.  Not the end of the world either
> >>>>     way, but something to consider.
> >>>
> >>> Sorry, too much work :-).
> >>>
> >>> (For reviewing a branch with merges from master I recommend to find the
> >>> latest merge commit, take the parent commit on the master side, and
> >>> range diff with that. (If you have the merge in the reflog, that
> >>> speeds up finding the latest merge, but that's only the case if you did
> >>> the merge in that repo.))
> >>
> >>     git diff origin/master...origin/scratch/text-index
> >>
> >> should take care of it.
> >>
> >> If there's interest, I could take care of rebasing (and improving the
> >> commit messages on the rebased commits) before merging into `master`.
> >
> > Please consider the branch yours, if you like, as far as I am concerned
> > :-). Because...
> >
> >>> I consider this feature done when that is in, and play with arm64 NEON a
> >>> bit instead. In C++ ;-).
> >
> > ...of that-
> 
> It just appeared to me that I better ask instead of making assumptions:
> When I landed tty child frames in master, there was a certain procedure
> how to do that.  See
> 
>   https://yhetil.org/emacs-devel/m2ldwdrnds.fsf@HIDDEN/
> 
> where I asked about this, and see Eli's reply. In essence: No rebasing,
> squashing, and so on. Following that procedure, is why I posted the
> change-log-style commit message for such a merge here.
> 
> My assumption up to a few minutes ago was that that procedure has
> changed

It hasn't changed.

Some people like to rebase, others dislike rebasing.  (Full
disclosure: I'm in the latter camp.)  Since we decided not to care
either way, we don't request contributors to do it one way or the
other: they can do it however they like, and we will accept that
regardless.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 23 Apr 2025 04:47:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 23 00:47:39 2025
Received: from localhost ([127.0.0.1]:51760 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u7S1I-0004RB-54
	for submit <at> debbugs.gnu.org; Wed, 23 Apr 2025 00:47:39 -0400
Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:50384)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u7S1C-0004PL-1S
 for 77924 <at> debbugs.gnu.org; Wed, 23 Apr 2025 00:47:33 -0400
Received: by mail-wr1-x42a.google.com with SMTP id
 ffacd0b85a97d-39c31e4c3e5so4071924f8f.0
 for <77924 <at> debbugs.gnu.org>; Tue, 22 Apr 2025 21:47:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745383643; x=1745988443; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=pZG5GxUojJpj/koYvFt1Ok329/eNL9LEAZZ5jFGH0K4=;
 b=XyEWgL+CRlaQbwH8+temyrbi0+r4oW0l6WCxlFVn+A1q1mKSBMm0HBAVAbGLQ2+0hL
 xz5r8Xbq1AFIHmcBkycELJryE8QVpA3l35/rN9f5g1aiWoixKkQLvFhElolMkwELLNgq
 by6QgZRT8EWXRnFgn5ckC6VVX32gxt8lkRBSsCiYAATChqzVdPbQbozbpbk93hWt1w+t
 N4V5e1wSSfynydRanzmMOkP4C8+FeDsKqom8Z7miY5/xRrMvngn8X3sieKiNtD6C1/Hn
 wSBNzcWSoLs0hHSUYwi4Vlq+9owC8AHH8upSiYnn3apK+o7j19AyLeX8rkBKuaIXRM40
 eMVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745383643; x=1745988443;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=pZG5GxUojJpj/koYvFt1Ok329/eNL9LEAZZ5jFGH0K4=;
 b=hMoN2kgOk0RZH5B+R0XpGGdBMR/K8cIflZtpPuM37172cTj0CHGhH3hFJESLSLZgQf
 mY62K41nn5hiCP0M69BY8c/3mVeaP6AAW6I9bs1liN+HKuQ9PgyiIIwREwZt7ADGpe0o
 EfA0t6Ss7PzdQDK7YzHEROKnI+huRfh1b4jMsVytx+HYqONUMVgAmiVXAbmJi/EiQ66r
 5K5BCDZhpnamflQ3b29BrPRyahuZyNVUpoPmVMjTKrlZZTxd9l+YGfTxQgN3V5bMcmbP
 tRVLKAblVyZYTBX9R8AP7DSZP0xuR/lBK4USnekvJ2R6Lin4QjKrJ922ty2lGnR5rubh
 K3Kw==
X-Forwarded-Encrypted: i=1;
 AJvYcCXwqkVZmPipl/j6km5Ki+OQ8ftAb05rfktBNFwkqAo8Hc0jMg3jMZ87SuaAas0+b7Czmkvn0Q==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YxYNNbfey88UwjBr278sxxyZfWn0+Frba1JGPnzkzN+Kj0ZYgAc
 BGfxRmH5KzcCRCwxW7VNY3lfcm2r8uIYN7nz+nIMasopG+E/rg8D7P98UO4B
X-Gm-Gg: ASbGncselJ39fRMKyogSYhdutGEAOS8+yHh+5JrFTSxMS5sgWWTzoJalIZCtyT1E1PR
 Am892c5Svcy4jYjGi5GJB4rrWD0tnfYUWSLiEd5oAi8WOXUCbR6PF34f8H2EjXpusZXXJu+V0Ig
 2Vd4prbPNbgsCk17TQWhkytv5U2JOYqdLKMWGEyJTSRtX53zheLlyRMIABzAhwa/ecLjGx7SC5G
 +yoTp2eUn/95VD+abxfcM8EmIb2K++O14vGNr9vu+Oh4TuZouZsm/3RNyJvP1GQ4fYjzULGJa6h
 o72gm5Jkt5zZxNYDGJ6vWDOCBO6PB2++87eBB6Z+W268fz3o6xuoTbgtSiYxshbuc2zxSRml4Dq
 lxa7WDSX+JKHrUJtgQ9PLCFPmfFOqg/td7He7BBTc4TgWWfshrw==
X-Google-Smtp-Source: AGHT+IFp7NgH85Sm0SwIhRrT2IUc89uyfzzpFcK00racoPJyoLBZayaEMDfZvQw6JSFJFOJWPM4wHQ==
X-Received: by 2002:adf:f94a:0:b0:39f:6e9:8701 with SMTP id
 ffacd0b85a97d-39f06e9871dmr7755023f8f.7.1745383642926; 
 Tue, 22 Apr 2025 21:47:22 -0700 (PDT)
Received: from pro2 (p200300e0b7376d00808a7ba45869fd57.dip0.t-ipconnect.de.
 [2003:e0:b737:6d00:808a:7ba4:5869:fd57])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-39efa43315esm17083895f8f.26.2025.04.22.21.47.22
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Apr 2025 21:47:22 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <m234e0xo35.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN>
 <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
 <m27c3cesxb.fsf@HIDDEN> <jwvzfg8493r.fsf-monnier+emacs@HIDDEN>
 <m234e0xo35.fsf@HIDDEN>
Date: Wed, 23 Apr 2025 06:47:21 +0200
Message-ID: <m2frhzbi1y.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: Stefan Kangas <stefankangas@HIDDEN>, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:

>>>> PS. BTW, a small procedural thing.  Instead of merging master into a
>>>>     scratch/ branch, I recommend deleting the branch, rebasing it on
>>>>     master, and then pushing it again.  This way, when we later merge =
it
>>>>     into master, we avoid the merge commits, and the history is kept
>>>>     clean and more easily reviewable.  Not the end of the world either
>>>>     way, but something to consider.
>>>
>>> Sorry, too much work :-).
>>>
>>> (For reviewing a branch with merges from master I recommend to find the
>>> latest merge commit, take the parent commit on the master side, and
>>> range diff with that. (If you have the merge in the reflog, that
>>> speeds up finding the latest merge, but that's only the case if you did
>>> the merge in that repo.))
>>
>>     git diff origin/master...origin/scratch/text-index
>>
>> should take care of it.
>>
>> If there's interest, I could take care of rebasing (and improving the
>> commit messages on the rebased commits) before merging into `master`.
>
> Please consider the branch yours, if you like, as far as I am concerned
> :-). Because...
>
>>> I consider this feature done when that is in, and play with arm64 NEON a
>>> bit instead. In C++ ;-).
>
> ...of that-

It just appeared to me that I better ask instead of making assumptions:
When I landed tty child frames in master, there was a certain procedure
how to do that.  See

  https://yhetil.org/emacs-devel/m2ldwdrnds.fsf@HIDDEN/

where I asked about this, and see Eli's reply. In essence: No rebasing,
squashing, and so on. Following that procedure, is why I posted the
change-log-style commit message for such a merge here.

My assumption up to a few minutes ago was that that procedure has
changed? Which I wouldn't know because I'm not following the lists for
some time. But, as I said, now I'm not really sure...




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 22 Apr 2025 16:15:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 22 12:15:40 2025
Received: from localhost ([127.0.0.1]:49581 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u7GHb-0003Pk-UZ
	for submit <at> debbugs.gnu.org; Tue, 22 Apr 2025 12:15:40 -0400
Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:54535)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u7GHZ-0003PO-GO
 for 77924 <at> debbugs.gnu.org; Tue, 22 Apr 2025 12:15:38 -0400
Received: by mail-wr1-x436.google.com with SMTP id
 ffacd0b85a97d-39ee682e0ddso3131016f8f.1
 for <77924 <at> debbugs.gnu.org>; Tue, 22 Apr 2025 09:15:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745338531; x=1745943331; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=0IdxlHIzBCDMPIji0toDWDgysoTF9XODBpOYwXcF03A=;
 b=TVZ4ZXhdliDOq6ZMyrEr3pz174tApPFiFtNfOzMcRQS6Hm2ZssGAUTfcmu9Xmp69Wn
 yNOVpEliLBR3Qctbb/8GT6nbfVsNz2uMto5bIscX6Z/vLVf+49ckl9Uez1dQ7Mlw+e1d
 /4lupRunX1CZUUxmdQXomOzriEHJd3P+Hv7hCuCU0gsaRh6sEbKn+f0EzaerGsvoer+B
 YxoSXnYuGIyAe3CIaHc9sehiqiIoEfGTXCA1rgPtWaB6Ksak1dANjz3PS4OL6umfl378
 zajq20Oo3r+LcBt3IcyZaI0IRARNNrLpd/uQZLHDo3CqSryKDJ7+h5SSmjdjk1Y41eeP
 AYBA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745338531; x=1745943331;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=0IdxlHIzBCDMPIji0toDWDgysoTF9XODBpOYwXcF03A=;
 b=MZaghdwwmlun+2OxpHUM16/UT3bw6VReqtQWYhXkFwHLkN1abQl8flbz41j46CU/5x
 231zYcPboBcsG962edTjaBdFVWrKJdvO8tsvirECpd+4krMoVLuQqi8dh/3OfLlrCukU
 Jusbin3u2LJ3XzQlM82GTUD9dQLPjvekwXjCqYQcgX5xEVThJcAV/eI0sjeHcTOmN7m4
 6ex+7vQwDvPLiSe+pG9JpN8hs5+brX8ZKL8ZXSCWalmk60gR1paQzVBGyvynhoXOcGqm
 VL6akydNKi4ox5vfQrehRP1tsYXdGUNHlfUjysitjWQKaVzlwJoGUXKt1TAQ42L7JtsT
 Gp5w==
X-Forwarded-Encrypted: i=1;
 AJvYcCVtmJYgK5fvfVuAgsgODIkvf886Mf8Yb4FioxPiL4sTnODmNF/m6S6XehAAtPsxsAC55iEJGg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzxwdwdBqZ0T3IsAtxVMriBVxdUtzOF+6bHjpqZLDgOFu5DjVAr
 O9q02FPgq9ohIgF3L+toNWFKKw/KQrrkfMgSzJvhJMC4pawMuTlhsFRK9pXT
X-Gm-Gg: ASbGncsfcHJzZ/TuEC/qfS0j5wJB3yTV5i8Fq6Sa7wVzarSIbgSnR6gc2YsDFh+Bh9J
 QySoFMMTAj6D0/WDupIdJ9NQJftZW623Jc6S8nXVjZoWytXWTRdF81Hg4mLUfVAL6Ky/TpWwEpb
 eqrmX3sZya/hTqcbM0Pi2wGK9UselpGxdlL7MAphEZChSpvTDSt4lqqlBadCYDdkNMwJSZ7Rmgb
 ToEtJiY3zOzXRSR00GqLQYjL4W6Fczf2cU1DKTyx3MdZL3pJddfbvTcdtEFIjsC/NUcr+oCcTmx
 5nxVLyXBoU2893uQARE71GFSER2EBWNj9S8V60EbaskMdwuzRHRgMMwjZnC7lrQ3yOJqwbjUY9B
 nD3O+iwQOtThw1JGlbm1wB2OUc76Mwko/t583sPBL0hmqc1LUCw==
X-Google-Smtp-Source: AGHT+IF2PJ5lppdBSepu8CJsJRFZlKLym4iu2BOEszFG5f5WzV73sAtKnGHFBgeuwWMeTT9IHemgbQ==
X-Received: by 2002:a05:6000:4201:b0:39e:cbc7:ad2c with SMTP id
 ffacd0b85a97d-39efba5ede7mr12658516f8f.25.1745338530785; 
 Tue, 22 Apr 2025 09:15:30 -0700 (PDT)
Received: from pro2 (p200300e0b7301900d125c0c7bda1f42d.dip0.t-ipconnect.de.
 [2003:e0:b730:1900:d125:c0c7:bda1:f42d])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-39efa4a4be2sm15468110f8f.83.2025.04.22.09.15.29
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Apr 2025 09:15:30 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <jwvzfg8493r.fsf-monnier+emacs@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN>
 <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
 <m27c3cesxb.fsf@HIDDEN> <jwvzfg8493r.fsf-monnier+emacs@HIDDEN>
Date: Tue, 22 Apr 2025 18:15:29 +0200
Message-ID: <m2sem0yxy6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: Stefan Kangas <stefankangas@HIDDEN>, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier <monnier@HIDDEN> writes:

> As discussed in the other thread, this performs fairly few
> charpos->bytepos conversions, actually.  Instead it spends most of its
> time inside the `diffseq.h` code.  You could try something like:
>
>     (require 'subr-x)
>=20=20=20=20=20
>     (defun elb-replace-region-contents-entry ()
>       (with-temp-buffer
>         (let ((step (apply #'concat (make-list 2000 "=F0=9F=99=82=C3=A9t=
=C3=A9=F0=9F=91=B6=F0=9F=8F=BF "))))
>           (dotimes (_ (/ 500000 (length step)))
>             (insert step))
>=20=20=20=20=20
>           (dotimes (_ 100000)
>             (let* ((a (+ (point-min) (random (buffer-size))))
>                    (b (min (+ a (length step) (random 512) -256) (point-m=
ax))))
>               (replace-region-contents a b (lambda () step)))))))
>
> which should spend more time in Emacs's code (especially in
> `buffer_chars_equal`) than in `diffseq.h`

Tried to run that on my mini, but it didn't finish in ca. 2h. So I tried
to call that function on my MB, and had to kill my Emacs :-).

Anyway, the other benchmarks showed an improvement over master, so I'm
content.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 22 Apr 2025 14:34:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 22 10:34:02 2025
Received: from localhost ([127.0.0.1]:49206 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u7EhF-0006o4-DY
	for submit <at> debbugs.gnu.org; Tue, 22 Apr 2025 10:34:01 -0400
Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:46383)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u7EhC-0006nh-ET
 for 77924 <at> debbugs.gnu.org; Tue, 22 Apr 2025 10:33:59 -0400
Received: by mail-wm1-x32e.google.com with SMTP id
 5b1f17b1804b1-43ea40a6e98so47745825e9.1
 for <77924 <at> debbugs.gnu.org>; Tue, 22 Apr 2025 07:33:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745332432; x=1745937232; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=on5QFVVfxk3WRAguyn+t3APA8iJPfIvDCaVsiaUrK7k=;
 b=PCwDjXWkck7uBJ6+CP78+EDHsH9I6Ym9M4+Zv2xrXe8v8SHsj2gztIWjKVNOTCUT/W
 xBU5okmA5HnCSlhpEVq+JH7D+GJ7pNwV269GJzG+ecLm5oEQjwRt9dODEvFQ26+YHg8j
 xZXCXAmp0noxjOxNo1m18fpYZH2UKJDUUkeQp8jyn+L+qnr6FQHNDsmsI1ctyfphcg6E
 sthLhjIhBhqWGspNGnVuNuZhQQjbYAu2VzvxLPmfnT0rr01k51RJUspAQL9WRBFn6u5B
 GKZD0jV/0L7q5I6eDzw6FVyNlAp5HnPcyrwmfZOLKjR7Ygg2I1f1oPAm661hJaTpaBtS
 5eQw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745332432; x=1745937232;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=on5QFVVfxk3WRAguyn+t3APA8iJPfIvDCaVsiaUrK7k=;
 b=MmKNN4BR3xOsNgiJPYl451WNg4Xw2RdCHlGLqnXdXROZ347hWlMwK7bZqAQd1idPE4
 jFViAw9VsSW8/sc6HLfZ+MYIdVj+nLP21u5O0oeJuMM733dcfRn2HDTzWz+kpwUZFGMn
 ai293V0yKVTLXwkrwacaP5X2KJn826HtspXdimo/mMATvEtz+PXx9wfOzlaQMNXXyKgT
 O8pd1rQ8RDGk3OF6d5p/Xj5WPE8Kvy0KzZXO+pHD3rV0JdCuqPun2JceLhblksBer8Gl
 Ul8k7HJqfCkMJyfzEiD4ftVr1n9WPqrUR32eOKgk8oxTIhybDE3GW1n1zReKdeoDr0AE
 wwvg==
X-Forwarded-Encrypted: i=1;
 AJvYcCXRXRah8EsrqPp1Tjr5svLNY25h3pR7+45654NdjKIdDZ+6xUwsQN4V1GXAsdrSKhnCKpVXxg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyA2VaQAtUvdpPqKwMxxq4HusPd2ocxLhr+Go8/UBjq8Wj15Gqy
 a9W/gOLEvy7Jh8Hgq2PaJQWN85LBhJBv8pa78GEc6XEwLjjIvvbpK3Qn3Pr4
X-Gm-Gg: ASbGncsuNSvv1icw5WeUpkhuyFisl3H42JFzS3CvBvZqsY2CoxVIZZkM30g0RzKVGRK
 gCx7y19veoc4HdMxI4chqV1j9q5p/AuNxgG15JQSw1LI/DW8y+C0FmMhVytVlew+GLqiOmvkr3t
 Cbx7LlpTG0qEqMfDgI4F32up6xAgi4J8fhMOH2UQnQcFXxPtiwSe6XrKnvBwtWYUJfTHnv7Dy/J
 wIcly6xYYUCvyAMbdbv7OOD85u44EGWyQA+uXYBPF6fDqMzIXSmC8hMTYc+OMvKYImVT9JGkYzq
 E9THNh/tqSDHp0gispwggVHQM4270xvg0sP+D1c/x/C6/bEVijN5lFBezQTjwdxmqjUH9AkZs7v
 +a0ebb/JLPEh8NxZyqu7qYbl/XvGmNkdrzyinoq31r+ZB
X-Google-Smtp-Source: AGHT+IEhVYXgDq5HF2+3KktF6Ezcj2/QoQ8nIWJ3qoJWxMt671lnxhFRS4KyL9JAKW1VfHplhlWRhA==
X-Received: by 2002:a05:600c:1f83:b0:43c:efed:733e with SMTP id
 5b1f17b1804b1-4406ab98a0dmr143932615e9.14.1745332431668; 
 Tue, 22 Apr 2025 07:33:51 -0700 (PDT)
Received: from pro2 (p200300e0b7301900b98b74cfc94b2689.dip0.t-ipconnect.de.
 [2003:e0:b730:1900:b98b:74cf:c94b:2689])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4406d5bbe45sm176827325e9.24.2025.04.22.07.33.51
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Apr 2025 07:33:51 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <jwvzfg8493r.fsf-monnier+emacs@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN>
 <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
 <m27c3cesxb.fsf@HIDDEN> <jwvzfg8493r.fsf-monnier+emacs@HIDDEN>
Date: Tue, 22 Apr 2025 16:33:50 +0200
Message-ID: <m234e0xo35.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: Stefan Kangas <stefankangas@HIDDEN>, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier <monnier@HIDDEN> writes:

>>> - Any chance you could add a comment explaining how you arrived at
>>>   text_index_interval=3D4*1024?  If it's arbitrarily chosen, adding a
>>>   comment to that effect might be useful.
>> It's neither completely arbitrary nor can I really say much about it.
>> INTERVAL / 2 is basically the worst-case distance one has to scan
>> through text. Don't really know what to say more, and the above is
>> pretty obvious.=20
>
> FWIW, the current code in `master` uses a threshold of 5k (sometimes 5k
> bytes, sometimes 5k chars) as the minimum distance between
> "cache-markers".
>
> It's a tradeoff between the size of the text-index array (and the time
> it takes to populate/update it) and the time it takes to scan the text
> from one of the positions recorded in that array to the position we're
> actually interested in.
>
> We haven't really investigated which value would be ideal.

True. It might even be different between machines, don't know. I once,
in the beginning, tried large values, don't remember, maybe 16K, and
performance seemed to drop, but not much. Difficult to find an ideal
value.

> The code that does the scan can probably be improved significantly
> (e.g. by processing the text several bytes at a time).

For sure.=20

>> (defun elb-replace-region-contents-entry ()
>>   (with-temp-buffer
>>     (let ((step (apply #'concat (make-list 2000 "=F0=9F=99=82=C3=A9t=C3=
=A9=F0=9F=91=B6=F0=9F=8F=BF "))))
>>       (dotimes (_ (/ 100000 (length step)))
>>         (insert step)))
>>=20
>>     (dotimes (_ 100000)
>>       (let* ((a (1+ (random (point-max))))
>>              (b (1+ (random (point-max))))
>>              (beg (min a b))
>>              (end (max a b)))
>>         (replace-region-contents beg end "=F0=9F=99=82=C3=A9t=C3=A9=F0=
=9F=91=B6=F0=9F=8F=BF =F0=9F=99=82=C3=A9t=C3=A9=F0=9F=91=B6=F0=9F=8F=BF "))=
)))
>
> As discussed in the other thread, this performs fairly few
> charpos->bytepos conversions, actually.  Instead it spends most of its
> time inside the `diffseq.h` code.  You could try something like:
>
>     (require 'subr-x)
>=20=20=20=20=20
>     (defun elb-replace-region-contents-entry ()
>       (with-temp-buffer
>         (let ((step (apply #'concat (make-list 2000 "=F0=9F=99=82=C3=A9t=
=C3=A9=F0=9F=91=B6=F0=9F=8F=BF "))))
>           (dotimes (_ (/ 500000 (length step)))
>             (insert step))
>=20=20=20=20=20
>           (dotimes (_ 100000)
>             (let* ((a (+ (point-min) (random (buffer-size))))
>                    (b (min (+ a (length step) (random 512) -256) (point-m=
ax))))
>               (replace-region-contents a b (lambda () step)))))))
>
> which should spend more time in Emacs's code (especially in
> `buffer_chars_equal`) than in `diffseq.h`
>
>>> PS. BTW, a small procedural thing.  Instead of merging master into a
>>>     scratch/ branch, I recommend deleting the branch, rebasing it on
>>>     master, and then pushing it again.  This way, when we later merge it
>>>     into master, we avoid the merge commits, and the history is kept
>>>     clean and more easily reviewable.  Not the end of the world either
>>>     way, but something to consider.
>>
>> Sorry, too much work :-).
>>
>> (For reviewing a branch with merges from master I recommend to find the
>> latest merge commit, take the parent commit on the master side, and
>> range diff with that. (If you have the merge in the reflog, that
>> speeds up finding the latest merge, but that's only the case if you did
>> the merge in that repo.))
>
>     git diff origin/master...origin/scratch/text-index
>
> should take care of it.
>
> If there's interest, I could take care of rebasing (and improving the
> commit messages on the rebased commits) before merging into `master`.

Please consider the branch yours, if you like, as far as I am concerned
:-). Because...

>> I consider this feature done when that is in, and play with arm64 NEON a
>> bit instead. In C++ ;-).

...of that-

>
> BTW, regarding processing several bytes at a time, we could try
> something like
>
>     long unsigned eightbytes =3D BUF_FETCH_8BYTES (bytepos);
>     long unsigned eightbits =3D ((~eightbytes) & 0x8080808080808080) >> 7;
>     long unsigned fourtwobits =3D eightbits + (eightbits >> 32);
>     long unsigned twofourbits =3D fourtwobits + (fourtwobits >> 16);
>     nchars +=3D (twofourbits + (twofourbits >> 8)) & 0xff;
>
> Not sure it would be significantly faster than the current code, tho.
> Maybe an even easier first change would be to replace
>
>       if (CHAR_HEAD_P (BUF_FETCH_BYTE (b, bytepos)))
>         ++charpos;
>
> with
>
>       charpos +=3D (~BUF_FETCH_BYTE (b, bytepos)) >> 7;
>
> so as to avoid a branch that can be sometimes hard to predict.
>

Hard to tell if that would be faster. Maybe if I know a bit more about
the current state of affairs of SIMD support, one could write something
using that.

That would certainly be faster. On my M1 chips it would mean processing
16 bytes at a time (128 bit registers), and I've seen a presentation
that talked about 256 and even 512 bits on some Intel CPUs (AMX).





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 22 Apr 2025 14:08:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 22 10:08:13 2025
Received: from localhost ([127.0.0.1]:49142 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u7EIH-0005Wd-D6
	for submit <at> debbugs.gnu.org; Tue, 22 Apr 2025 10:08:13 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24109)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1u7EID-0005WM-CL
 for 77924 <at> debbugs.gnu.org; Tue, 22 Apr 2025 10:08:10 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 21E90807B7;
 Tue, 22 Apr 2025 10:08:00 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1745330879;
 bh=kJ8/x3iHlNeGMYzyIxdnhfPN7sLOCY952fURqJFoG3E=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=e6nkIlYXu02DPSriAmXduud6bs5lhFcFjmckr3uynlCVajSygIEsZPbUyz6mz+AF4
 qhPV+BKkIVyvAYyPMjG4dmJYOWVooWR+Rj6EUgX6ybykh1X+V2ItFRHT8oLSzTzAjC
 y/Va3R3MQ+hCKk7mNPs7QWJNpoQqAxZyP5oBZOCcXkYQG4aex53zRrqJpNxdkKrfUY
 VZeFwJjcebEDvMhwBLiKM+k/+J/SA0y/O43edhVtREGq2ZDXVBIhgkESXZ4e6Sukpy
 ijjxFQss8TtuG4TVA69HkQuszIRUSoyCQriCiKejZJmFeHh9GnAwr0u4v+R3KtImit
 GPOOZ4ZyTnr1w==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 13648803EA;
 Tue, 22 Apr 2025 10:07:59 -0400 (EDT)
Received: from pastel (104-195-208-18.cpe.teksavvy.com [104.195.208.18])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D31AC120568;
 Tue, 22 Apr 2025 10:07:58 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Gerd =?windows-1252?Q?M=F6llmann?= <gerd.moellmann@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <m27c3cesxb.fsf@HIDDEN>
Message-ID: <jwvzfg8493r.fsf-monnier+emacs@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN>
 <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
 <m27c3cesxb.fsf@HIDDEN>
Date: Tue, 22 Apr 2025 10:07:58 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
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.064 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
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77924
Cc: Stefan Kangas <stefankangas@HIDDEN>, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> - Any chance you could add a comment explaining how you arrived at
>>   text_index_interval=3D4*1024?  If it's arbitrarily chosen, adding a
>>   comment to that effect might be useful.
> It's neither completely arbitrary nor can I really say much about it.
> INTERVAL / 2 is basically the worst-case distance one has to scan
> through text. Don't really know what to say more, and the above is
> pretty obvious.=20

FWIW, the current code in `master` uses a threshold of 5k (sometimes 5k
bytes, sometimes 5k chars) as the minimum distance between
"cache-markers".

It's a tradeoff between the size of the text-index array (and the time
it takes to populate/update it) and the time it takes to scan the text
from one of the positions recorded in that array to the position we're
actually interested in.

We haven't really investigated which value would be ideal.

The code that does the scan can probably be improved significantly
(e.g. by processing the text several bytes at a time).

> (defun elb-replace-region-contents-entry ()
>   (with-temp-buffer
>     (let ((step (apply #'concat (make-list 2000 "=F0=9F=99=82=C3=A9t=C3=
=A9=F0=9F=91=B6=F0=9F=8F=BF "))))
>       (dotimes (_ (/ 100000 (length step)))
>         (insert step)))
>=20
>     (dotimes (_ 100000)
>       (let* ((a (1+ (random (point-max))))
>              (b (1+ (random (point-max))))
>              (beg (min a b))
>              (end (max a b)))
>         (replace-region-contents beg end "=F0=9F=99=82=C3=A9t=C3=A9=F0=9F=
=91=B6=F0=9F=8F=BF =F0=9F=99=82=C3=A9t=C3=A9=F0=9F=91=B6=F0=9F=8F=BF ")))))

As discussed in the other thread, this performs fairly few
charpos->bytepos conversions, actually.  Instead it spends most of its
time inside the `diffseq.h` code.  You could try something like:

    (require 'subr-x)
=20=20=20=20
    (defun elb-replace-region-contents-entry ()
      (with-temp-buffer
        (let ((step (apply #'concat (make-list 2000 "=F0=9F=99=82=C3=A9t=C3=
=A9=F0=9F=91=B6=F0=9F=8F=BF "))))
          (dotimes (_ (/ 500000 (length step)))
            (insert step))
=20=20=20=20
          (dotimes (_ 100000)
            (let* ((a (+ (point-min) (random (buffer-size))))
                   (b (min (+ a (length step) (random 512) -256) (point-max=
))))
              (replace-region-contents a b (lambda () step)))))))

which should spend more time in Emacs's code (especially in
`buffer_chars_equal`) than in `diffseq.h`

>> PS. BTW, a small procedural thing.  Instead of merging master into a
>>     scratch/ branch, I recommend deleting the branch, rebasing it on
>>     master, and then pushing it again.  This way, when we later merge it
>>     into master, we avoid the merge commits, and the history is kept
>>     clean and more easily reviewable.  Not the end of the world either
>>     way, but something to consider.
>
> Sorry, too much work :-).
>
> (For reviewing a branch with merges from master I recommend to find the
> latest merge commit, take the parent commit on the master side, and
> range diff with that. (If you have the merge in the reflog, that
> speeds up finding the latest merge, but that's only the case if you did
> the merge in that repo.))

    git diff origin/master...origin/scratch/text-index

should take care of it.

If there's interest, I could take care of rebasing (and improving the
commit messages on the rebased commits) before merging into `master`.

> I consider this feature done when that is in, and play with arm64 NEON a
> bit instead. In C++ ;-).

BTW, regarding processing several bytes at a time, we could try
something like

    long unsigned eightbytes =3D BUF_FETCH_8BYTES (bytepos);
    long unsigned eightbits =3D ((~eightbytes) & 0x8080808080808080) >> 7;
    long unsigned fourtwobits =3D eightbits + (eightbits >> 32);
    long unsigned twofourbits =3D fourtwobits + (fourtwobits >> 16);
    nchars +=3D (twofourbits + (twofourbits >> 8)) & 0xff;

Not sure it would be significantly faster than the current code, tho.
Maybe an even easier first change would be to replace

      if (CHAR_HEAD_P (BUF_FETCH_BYTE (b, bytepos)))
        ++charpos;

with

      charpos +=3D (~BUF_FETCH_BYTE (b, bytepos)) >> 7;

so as to avoid a branch that can be sometimes hard to predict.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 22 Apr 2025 12:35:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 22 08:35:22 2025
Received: from localhost ([127.0.0.1]:46680 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u7CqQ-0000P9-BF
	for submit <at> debbugs.gnu.org; Tue, 22 Apr 2025 08:35:22 -0400
Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:57697)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u7CqL-0000Ja-Ve
 for 77924 <at> debbugs.gnu.org; Tue, 22 Apr 2025 08:35:20 -0400
Received: by mail-wr1-x435.google.com with SMTP id
 ffacd0b85a97d-39ac9aea656so6432665f8f.3
 for <77924 <at> debbugs.gnu.org>; Tue, 22 Apr 2025 05:35:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745325311; x=1745930111; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=9nGA6aIVQjMwSpRqCbGI68janZHQuzAZ1L5Qa9zWo6U=;
 b=ZIU1/jmWFnvmwIP6lLQ8PDFqoMFQqR3/FH8DsPA/WT/RaxQGLUxCRRdEHhdS3KNNjk
 5B8G6JSXiGuIdlLAbjCN3Ydtfo+pGmXV2m3LobOhLwn5d/n+VVR7xDx8uXf18/VeXPv+
 bGws6fn8WeE1YsYl7io48qbV9hp0SgpeAKo68EHM1BeAZ01BVIQEBKD0kvDUhX/6URXk
 26KpCj9AcrqtMGF+Fmxx6RY58EzW65/cUQyJKRW8uI5ZzDpsaUm73b/6fivAe57Vkz0J
 S7antqXvH8HJHjQ4On/fgr6BV4TvUusT8NQKk6TtaWSK7DmiNcehEX7sk3HSobAUhL70
 buBg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745325311; x=1745930111;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=9nGA6aIVQjMwSpRqCbGI68janZHQuzAZ1L5Qa9zWo6U=;
 b=qvPuVFjC69wSDh5VJrfxTizshZl9kB+C/WY2UlVB/lWas/qionw3WNT8/yAhFE2Cah
 pyZPNcK2FA9eUrhUJaClqZiYYG6V0k97qRSiA3gosUu6ofq9NszFXkv2716/EMwut134
 /TXkVzMUityS93uCPKS/mAwI/D+jnmr+E8n2MHA6w2ex3Op2tqPGfijfgi9Cwy1OEO2o
 c0h75Y2H8xzzN0ffKFKSV/LYmPCtimxa1Br3xbwKjb1gKo3IuEB5+JKznyAYNYopNJua
 wXvotH5umgdf2ObSlKhfruL+CifwBQl2wwBOBFSVRvsaQ5UCb01fQpn+V57kHXHR5VMv
 hLXg==
X-Gm-Message-State: AOJu0YxkNP6gpn7Q1vqqTHphGcR9/dBulIw4mmnNVR0xvNYJOS6VlVKB
 UJq6dzEaWUvN/pCnjgMNF83AO+dok/hYSk3cuQ5F0hdltvPjZuYd
X-Gm-Gg: ASbGncvRsRYTaZJl27ikVQQs5gK9xsVRcATdVJdg0uOZVMRVim+j/DadYIypIkNgqMP
 AakLBhEZMZ4J3RIBmX57D/mPevthXr76VyJqjYQBIJoFvlQY6niVgx15/fn955rKzYFQ+KJF1aZ
 UJ1aA27DvHVBE3OT3BLqIlWAh0yjpm33riSuLy/kwhvEUuMm3uqSe5muolXbizvNOp6oONYRM60
 n3BItY0wNX/bsJ9L6ZCJTXKTBMa3QGmSx1s9hiTHGn0GgGOZYn4ywIYeNnYSI2f+XjImA5qkfm7
 v3jfZYeiU8VuU08Yk76RBJFyRJp30+kvYp4g8/aj1OizAO6F6rUjs/rlpnxe0AznLxcybVkrXbo
 3KK5/BVB66wrlkzWUeAY33t/a2kGnoacjm5Efi7RCFSpPs6K6ZsWuFzc=
X-Google-Smtp-Source: AGHT+IGzuho3kRn4rCOEWC6cWyh6x6r1qp3xkirZzO2cOddwwWmrnTcXTNqRTvYLXmBQEKEfJNpgKg==
X-Received: by 2002:a05:6000:188e:b0:391:4835:d8a8 with SMTP id
 ffacd0b85a97d-39efba2ab31mr12878607f8f.1.1745325311341; 
 Tue, 22 Apr 2025 05:35:11 -0700 (PDT)
Received: from pro2 (p200300e0b7301900b98b74cfc94b2689.dip0.t-ipconnect.de.
 [2003:e0:b730:1900:b98b:74cf:c94b:2689])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-39efa4a4f21sm15329030f8f.91.2025.04.22.05.35.10
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Apr 2025 05:35:10 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <m2v7qw8uhh.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN>
 <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
 <m27c3cesxb.fsf@HIDDEN> <m2v7qw8uhh.fsf@HIDDEN>
Date: Tue, 22 Apr 2025 14:35:09 +0200
Message-ID: <m24iygz85e.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: Stefan Monnier <monnier@HIDDEN>, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:

> * Without optimization Results
>
>   | test                    | non-gc (s) | gc (s) | gcs | total (s) | err=
 (s) |
>   |-------------------------+------------+--------+-----+-----------+----=
-----|
>   | replace-region-contents |       0.93 |   0.00 |   0 |      0.93 |    =
0.33 |
>   |-------------------------+------------+--------+-----+-----------+----=
-----|
>   | total                   |       0.93 |   0.00 |   0 |      0.93 |    =
0.33 |
>
> * With opt. Results
>
>   | test                    | non-gc (s) | gc (s) | gcs | total (s) | err=
 (s) |
>   |-------------------------+------------+--------+-----+-----------+----=
-----|
>   | replace-region-contents |       0.89 |   0.00 |   0 |      0.89 |    =
0.32 |
>   |-------------------------+------------+--------+-----+-----------+----=
-----|
>   | total                   |       0.89 |   0.00 |   0 |      0.89 |    =
0.32 |

** master Results

  | test                    | non-gc (s) | gc (s) | gcs | total (s) | err (=
s) |
  |-------------------------+------------+--------+-----+-----------+------=
---|
  | replace-region-contents |       1.04 |   0.00 |   0 |      1.04 |    0.=
33 |
  |-------------------------+------------+--------+-----+-----------+------=
---|
  | total                   |       1.04 |   0.00 |   0 |      1.04 |    0.=
33 |

So, improvement, also here with text-index.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 22 Apr 2025 08:35:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 22 04:35:02 2025
Received: from localhost ([127.0.0.1]:45130 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u795q-0003t8-9U
	for submit <at> debbugs.gnu.org; Tue, 22 Apr 2025 04:35:02 -0400
Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:43454)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u795m-0003sV-RP
 for 77924 <at> debbugs.gnu.org; Tue, 22 Apr 2025 04:34:59 -0400
Received: by mail-wm1-x32b.google.com with SMTP id
 5b1f17b1804b1-43cf628cb14so42604975e9.1
 for <77924 <at> debbugs.gnu.org>; Tue, 22 Apr 2025 01:34:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745310892; x=1745915692; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=Tb4JDkU2blnmN5x2g4np2S05h3U5piwkOOK/N1EzUuo=;
 b=dUpGB/zZoSB46d/SsQ5TJP9V7wXz5Qgi/wVyjW0aZKHbSh4LcsYv2E4zMDPvU4xUi9
 vLHysKSosWo5JuN68iBZbHD+vahBEapeeKbvIrXXK71SN21y8M4p0Gz8gIjOkTT9KNBI
 aH61s+3TYWz/YXxr9pJ00F47/KC3PDJcEqUWL5sx/IdHc6ox5sQQ7vYRI1aOm5dtwkOv
 7UUaNGCFotlVH/l4bB4MPHJiYpwS/IuAgQxCHm2MpgFHaJjP81jV5ut3oSdb+mxie/vu
 YJqKtGJUntXi5UjFylnHRtsSUgXt09KalAtj/r9IYddGuI68ouwG3D1pQ944wZzjBAAY
 SlHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745310892; x=1745915692;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=Tb4JDkU2blnmN5x2g4np2S05h3U5piwkOOK/N1EzUuo=;
 b=bnVUMe9rvX/VhmaQ8EhIwWfGzI9E2OH1GlAdPHCQ4dCCkKT5YSF+27/6YYFUWY8Q0Z
 SJHuYD9np1P1J7x8UfnbBYxbW9qD9JO0ORbfqmaZSVUeSpDrZK0Y+auhurMX7JH3U7Wf
 +LS4GLkYpJfgQkqniKYlmGhT629pIuwpKf3paQ17HeCqXNRXb1d+dGp/Srbx+QrlgqE+
 iJgA9M4GmLUaA0tB/uQPjCmybYG0jbsmxpUODQ7Cr5oPmQhjrpnvQqdUR/7/JBjArtfo
 xBboUETqp01maJiBBvqeWxXzVq30SRma1meV238ju6OPcpOaprmdS5Skbw5GrkkHRChB
 vbyQ==
X-Gm-Message-State: AOJu0YwLyRf25S/6XxydYtIf44dbwHgougZY+Yz7sXltTkVXCK2fklmP
 +jCEwKf9xzHv1R0veg01wAoeK2914cDOdKWnbUsSuyjrEo84GGAp
X-Gm-Gg: ASbGncsvsDN7CwkQnMDEM7Ged0fRJvgXO2Spf9wzbElcngZAibA17xfmisGNFZjTGlU
 VneZ7gqdUTNJd4nR8U48QHrmd/b3219ff4EWyWXbPbnEnMGPngF2/OQB/A8XjQzQE/onudHNOLn
 nsaAXxk2FKw+Gy5jrmtKE9GuHEmutvhS87OI6849/p9gGpdm2hg3gCtIGJ3sa0Dy5MT7LVKrG6v
 HHXVgjqmCBHzKrknABEKIcpSlWojhLh2seDPlT/v2dkhZi5zFyjMOrDg2395rAHn45dhm76bWdI
 faKKdZik0Qp1fYlEXFQ7xLE+U4OCHeCHYW8BeQhnXKIC7AoiiE9yBXU8LKGn3K65MCHHWRA0zKS
 nhiXWxv/aNr9L7KH5foRnaif1YH2+ohAtoUgzWRSzm0mf
X-Google-Smtp-Source: AGHT+IEPb9L3GK6F2JqmVlIJ4kUNmfaccmKk9VCh6IJjdCW0zyPyKBhevDxE4kDELRl/8hBvyShgOw==
X-Received: by 2002:a05:6000:4313:b0:39f:d0a:5b23 with SMTP id
 ffacd0b85a97d-39f0d0a5b9fmr3489827f8f.17.1745310892215; 
 Tue, 22 Apr 2025 01:34:52 -0700 (PDT)
Received: from pro2 (p200300e0b7301900b98b74cfc94b2689.dip0.t-ipconnect.de.
 [2003:e0:b730:1900:b98b:74cf:c94b:2689])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-39efa4a4f2dsm14543928f8f.95.2025.04.22.01.34.51
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Apr 2025 01:34:51 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <m27c3cesxb.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN>
 <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
 <m27c3cesxb.fsf@HIDDEN>
Date: Tue, 22 Apr 2025 10:34:50 +0200
Message-ID: <m2v7qw8uhh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: Stefan Monnier <monnier@HIDDEN>, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:

> Stefan Kangas <stefankangas@HIDDEN> writes:
>
>> This sounds great.  I pushed a couple of typo fixes while reading the
>> patches, please use them as you see fit (squash, etc.).
>
> Thanks, I've ported that back to my side.
>
>>
>> - Any chance you could add a comment explaining how you arrived at
>>   text_index_interval=3D4*1024?  If it's arbitrarily chosen, adding a
>>   comment to that effect might be useful.
>
> It's neither completely arbitrary nor can I really say much about it.
> INTERVAL / 2 is basically the worst-case distance one has to scan
> through text. Don't really know what to say more, and the above is
> pretty obvious.
>
>>
>> - Maybe rename `text-index-interval` to `text-index--interval` (to
>>   indicate that it's internal)?
>>
>> - I guess `use-text-index` can be removed?
>
> I've removed these Lisp variables a few days ago or so. They were only
> for experimenting with the whole thing.
>
>>> Please see the comments at the start of marker-vector.c and text-index.c
>>> for more details. Also see the thread(s) on emacs-devel with Stef an me.
>>
>> For posterity, I guess that would be:
>>
>> Re: Question about region caches
>> https://lists.gnu.org/r/emacs-devel/2025-03/msg01382.html
>>
>> PS. BTW, a small procedural thing.  Instead of merging master into a
>>     scratch/ branch, I recommend deleting the branch, rebasing it on
>>     master, and then pushing it again.  This way, when we later merge it
>>     into master, we avoid the merge commits, and the history is kept
>>     clean and more easily reviewable.  Not the end of the world either
>>     way, but something to consider.
>
> Sorry, too much work :-).
>
> (For reviewing a branch with merges from master I recommend to find the
> latest merge commit, take the parent commit on the master side, and
> range diff with that. (If you have the merge in the reflog, that
> speeds up finding the latest merge, but that's only the case if you did
> the merge in that repo.))

There was the open question left whether or not it pays off to avoid the
binary search in charpos -> bytepos conversion. Benchmarked it with

(defun elb-replace-region-contents-entry ()
  (with-temp-buffer
    (let ((step (apply #'concat (make-list 2000 "=F0=9F=99=82=C3=A9t=C3=A9=
=F0=9F=91=B6=F0=9F=8F=BF "))))
      (dotimes (_ (/ 100000 (length step)))
        (insert step)))

    (dotimes (_ 100000)
      (let* ((a (1+ (random (point-max))))
	     (b (1+ (random (point-max))))
	     (beg (min a b))
	     (end (max a b)))
	(replace-region-contents beg end "=F0=9F=99=82=C3=A9t=C3=A9=F0=9F=91=B6=F0=
=9F=8F=BF =F0=9F=99=82=C3=A9t=C3=A9=F0=9F=91=B6=F0=9F=8F=BF ")))))

2000 runs on my idle Mac mini, M1 etc.

* Without optimization Results

  | test                    | non-gc (s) | gc (s) | gcs | total (s) | err (=
s) |
  |-------------------------+------------+--------+-----+-----------+------=
---|
  | replace-region-contents |       0.93 |   0.00 |   0 |      0.93 |    0.=
33 |
  |-------------------------+------------+--------+-----+-----------+------=
---|
  | total                   |       0.93 |   0.00 |   0 |      0.93 |    0.=
33 |

* With opt. Results

  | test                    | non-gc (s) | gc (s) | gcs | total (s) | err (=
s) |
  |-------------------------+------------+--------+-----+-----------+------=
---|
  | replace-region-contents |       0.89 |   0.00 |   0 |      0.89 |    0.=
32 |
  |-------------------------+------------+--------+-----+-----------+------=
---|
  | total                   |       0.89 |   0.00 |   0 |      0.89 |    0.=
32 |

I think the large err values are because of the random and the O(ND) in
replace-region-contents. Whatever, the optimization seems to pay off, so
I'll add that to scratch/text-index on savannah later.

Tests with the change:

SUMMARY OF TEST RESULTS
-----------------------
Files examined: 530
Ran 8041 tests, 7765 results as expected, 0 unexpected, 276 skipped

I consider this feature done when that is in, and play with arm64 NEON a
bit instead. In C++ ;-).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 22 Apr 2025 04:12:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 22 00:12:11 2025
Received: from localhost ([127.0.0.1]:42737 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u74zT-0007kL-0t
	for submit <at> debbugs.gnu.org; Tue, 22 Apr 2025 00:12:11 -0400
Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:51615)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u74zQ-0007k7-Hf
 for 77924 <at> debbugs.gnu.org; Tue, 22 Apr 2025 00:12:09 -0400
Received: by mail-wr1-x432.google.com with SMTP id
 ffacd0b85a97d-3995ff6b066so2407864f8f.3
 for <77924 <at> debbugs.gnu.org>; Mon, 21 Apr 2025 21:12:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745295122; x=1745899922; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=hVIv5zgmPHgMvarwMS47WoU8pTy3QGZRk7haxdG839w=;
 b=fD+qj8C8ptm2Le/g+KNgchzXXPFVJ35HNqQ3EJZH6f7G1hGQtPnluEARBKnJogoWgA
 /fuT9TQKTCSPuRAdtmlPUySF9Qcs3DKcz9X0MVFI1MsATWwHlFO72MpOpquFpg1XniSA
 bHq+TLB0R3xRXN0rHFCjEx2kE379aWW0k2dnJ4+lI70LWQxHwahYbbDh00fzP3L+vuE4
 2im6ObBAQgijAlDzJTvYAUYEcpBxMosZt+a26N9Pm0svACDEoHO3x2AJMJcolgxEW8WX
 f8QP7SdVLyQCAmQZE0PuM2n/AttR+VVknmHj2exvI34v/a0kWCUseahLpiaDUoGv5ujR
 Hnnw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745295122; x=1745899922;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=hVIv5zgmPHgMvarwMS47WoU8pTy3QGZRk7haxdG839w=;
 b=p0VvOgIk/q5LODkzPm5Sozq7hy2v03pbx94DJtbj9mOdQ9UyNzocAjaBnIAeXuGUb1
 LgRAGMzIiWzx17c2Q1XhlVzTrq4MCRj/Fd5z8G2LeSYyN1OAJWa5HnthY2271QZgstUw
 bcOpZtcBkNOo337abdqFxtsBhiLZfkSu8UyHaKT/MpG5GRaR9ASgNb+YTSXa0DZtioQX
 o5ffjjGu+J+y4xG4K/LMymgG2zZUwHFKx/sM27pG2w09SQpbej+XDNP3c3LufmD74LMV
 yOtLxfPIHKwCzrLkSaimRAfSWMeR3L7XQRHT1BI/oHxRQFzsxXysJvE2N8aKRWf3037i
 utqg==
X-Gm-Message-State: AOJu0YxiAZICq5mZC/vwxinbA+RXiEyD68ASs/1npIkX4YOdVrBbda7Z
 u2Y51jbA+MhrpmdWS3iTko/Uur8lRJl51Dw8K7NT/3aZE1qAZICIeSP3KA==
X-Gm-Gg: ASbGncuWsUsNY92FP5CwUI6fSmajIO/1vkTf/qjKvPgrLXvNMWvw0l8lHyw3aI8nsxz
 8UUatNdLP1C8LC1GHxjTdDEH/ds71rxYamFCNZjggXrr8iGVwtvomz+ttIw97nNt70VzAlOtRLe
 tiOEdba5G4bhcFU543dnmsXQ5vkJIc4iM/YT4R0XSGOJ8lGz5NT2IHjgdP6UsimTqA9MiYlnwJC
 ewHQ47mPvvZU2+5xTHUQ4m40J4doMs9GPEv+XAi/7DZUo7aLRsJs7hz3sRs1eWuaO4wzdftzY/h
 O2Hp0zOznYf0EXzGOr0yrfa2iFefr9Stqo0a6RSz9HIQcJ5TwzYhV25IMWKaZxdQKdWT4CH4SLU
 koIJvJ269lF84srS4J7ysfqFwMsirwts1dK7nZpr1pfes
X-Google-Smtp-Source: AGHT+IEKSMMQP7pfvjG1yqbjGKdKa1M4UeCeNOnnVAumOjK7ApppRgY+xxiLxGNyDAWxYt7s+Qejfg==
X-Received: by 2002:a5d:584e:0:b0:39c:140c:25e with SMTP id
 ffacd0b85a97d-39efba560b1mr10232167f8f.24.1745295121817; 
 Mon, 21 Apr 2025 21:12:01 -0700 (PDT)
Received: from pro2 (p200300e0b7301900b98b74cfc94b2689.dip0.t-ipconnect.de.
 [2003:e0:b730:1900:b98b:74cf:c94b:2689])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4406d5cf3a7sm157372395e9.32.2025.04.21.21.12.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 21 Apr 2025 21:12:01 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN>
 <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
Date: Tue, 22 Apr 2025 06:12:00 +0200
Message-ID: <m27c3cesxb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: Stefan Monnier <monnier@HIDDEN>, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Kangas <stefankangas@HIDDEN> writes:

> This sounds great.  I pushed a couple of typo fixes while reading the
> patches, please use them as you see fit (squash, etc.).

Thanks, I've ported that back to my side.

>
> - Any chance you could add a comment explaining how you arrived at
>   text_index_interval=4*1024?  If it's arbitrarily chosen, adding a
>   comment to that effect might be useful.

It's neither completely arbitrary nor can I really say much about it.
INTERVAL / 2 is basically the worst-case distance one has to scan
through text. Don't really know what to say more, and the above is
pretty obvious. 

>
> - Maybe rename `text-index-interval` to `text-index--interval` (to
>   indicate that it's internal)?
>
> - I guess `use-text-index` can be removed?

I've removed these Lisp variables a few days ago or so. They were only
for experimenting with the whole thing. 

>> Please see the comments at the start of marker-vector.c and text-index.c
>> for more details. Also see the thread(s) on emacs-devel with Stef an me.
>
> For posterity, I guess that would be:
>
> Re: Question about region caches
> https://lists.gnu.org/r/emacs-devel/2025-03/msg01382.html
>
> PS. BTW, a small procedural thing.  Instead of merging master into a
>     scratch/ branch, I recommend deleting the branch, rebasing it on
>     master, and then pushing it again.  This way, when we later merge it
>     into master, we avoid the merge commits, and the history is kept
>     clean and more easily reviewable.  Not the end of the world either
>     way, but something to consider.

Sorry, too much work :-).

(For reviewing a branch with merges from master I recommend to find the
latest merge commit, take the parent commit on the master side, and
range diff with that. (If you have the merge in the reflog, that
speeds up finding the latest merge, but that's only the case if you did
the merge in that repo.))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 22 Apr 2025 02:29:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 21 22:29:59 2025
Received: from localhost ([127.0.0.1]:42016 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u73OZ-0006QS-8t
	for submit <at> debbugs.gnu.org; Mon, 21 Apr 2025 22:29:59 -0400
Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]:46517)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1u73OW-0006Q6-0k
 for 77924 <at> debbugs.gnu.org; Mon, 21 Apr 2025 22:29:57 -0400
Received: by mail-ed1-x532.google.com with SMTP id
 4fb4d7f45d1cf-5f3f04b5dbcso6326662a12.1
 for <77924 <at> debbugs.gnu.org>; Mon, 21 Apr 2025 19:29:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745288990; x=1745893790; darn=debbugs.gnu.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=LtugAM+2soJLY6Vo5WyLZZN6rdXf3MY443IWnAR+la0=;
 b=HcodGUEKfRkKg1OuKbqr2ZX8EkFQYsuuFdXX5Zk4dcuwFi+J8bWXQ4hhTZXWiQocRF
 I6wY21cuHo2KH8muGGCERHreC9/mdV7/GuYMoChMGvlSrcByH1hQSrm6CPLI6JLf+STh
 wF1arthN7mq8EwvaMJbJvJYGP+SmHOgfpnc4kYZkwDyYk4y5olC8+qg+fFJs4exgb1VJ
 E6TERmkXGd+XrbyavjnktDYBFUo7PETxSVBOZQb+/F2KEvzX3MqJt5g+qBG4PsgAbc+G
 8G0yk6Kj4vUkP0lOPVECsEIJHIL3xkrQ/jIXfnCedcUwtVaJJyKffAeyne/0pXq5JJOR
 2aMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745288990; x=1745893790;
 h=content-transfer-encoding:cc:to:subject:message-id:date
 :mime-version:references:in-reply-to:from:x-gm-message-state:from:to
 :cc:subject:date:message-id:reply-to;
 bh=LtugAM+2soJLY6Vo5WyLZZN6rdXf3MY443IWnAR+la0=;
 b=InoLe6Nw5DJ2742ZgN+jZzRgGY1/doBbVZ+xNzgaIH6pPGNxFm6JlcKhWhA8CAh0Ty
 zTXWziuS1gQ5XLtep1RUkxAsKLcQwaVu5eVX6z52SPApX0ALLz4d2iEHANeEMfIsBgYK
 LEVkIv/ijs9qZ6aHW5H4t+5uAIi8hz7GAEmPFBTVI1a765uNjV3SevWbXGELimL7fS3A
 5RHdFZo4NnqSctYyQn+guQ7Xqth5y6Rczn1tc64+OBGMKtYHpo1X6NGNUV15+//PofxU
 NPMFFGGW1WkJwxns+7pXSN5qVFDKwNbKpFSM4CqVnq2EWnw2h/PE9HWuNOJCzkUCvoqh
 zDCQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVOUHyVpII3jYBdV4TyNVYxCnxPK0g78YvMNpLU/UBJucmw1MKHCrpO9SzJu3oEhM093iiUuQ==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yza5uuXVWAEOsRkdy0QFZek50cBMR1wfH/5gVSRLiYdsBMP+ki0
 Db+N92PCwd3puMhojmyunMZlORhzFF7p67KOXo/mS+JobZBBL+ZpxJGLAiK6kTEVJ+8/IoKcsyi
 d+VtIt2taBYBmuLsTxlQhpfrzWEE7SwnP
X-Gm-Gg: ASbGncsfSGtHlO6vGe5Ae3XpQQqutFz6yvv880G6owPX3aUMzAN8lM1DCX3UTKpv13+
 87RdY9zIdYx48oyGt3xeMzHidnsYczNivTaN/jX4dUtSd+8VA+SaEb9ha5DH+9wphhucVZSdgq3
 e7TGSWGPAdXoN/LsoQtd2bcOIS
X-Google-Smtp-Source: AGHT+IEk7Gfbl0OniHnOZ1VkCJy3qesbBCbCkyNIBJ2ely3f6kfOWFnfu1cdvrbJPdA307+6DywYI0k99uOTpCPSBjI=
X-Received: by 2002:a05:6402:2356:b0:5f6:21a4:61d5 with SMTP id
 4fb4d7f45d1cf-5f62857414dmr11380628a12.17.1745288989730; Mon, 21 Apr 2025
 19:29:49 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 21 Apr 2025 22:29:47 -0400
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 21 Apr 2025 22:29:47 -0400
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <m2jz7gp25p.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN>
MIME-Version: 1.0
Date: Mon, 21 Apr 2025 22:29:47 -0400
X-Gm-Features: ATxdqUFqPQGYNq0kzbhaE9F0TIBWpuuS7qnAH3sIfvyBsmsHLRu8SaiBzpMbiaw
Message-ID: <CADwFkmmabgGhBFUFYeNuFUuJC575YZdA+PVaOh19Hnxj-A-1wQ@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
To: =?UTF-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>, 
 77924 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:

> This is about the branch scratch/text-index on savannah, which is a port
> of what I have in my Emacs.
>
> The branch changes the implementation of Lisp markers.
>
> - Markers no longer form a doubly-linked list, they are stored in a
>   marker vector instead which allows O(1) insertion and deletion of
>   markers. (The idea of a marker vector is from what I did in igc. In my
>   Emacs, both igc and old GC use the same marker vector implementation.
>   The new one is different from the one in feature/igc.)
>
> - Lisp_Marker doesn't contain the character position directly. It is
>   stored in the marker vector instead. This leads to faster,
>   cache-friendly, marker position adjustments.
>
> - Markers don't contain byte positions. Byte positions are computed when
>   needed. Bytepos <-> charpos conversion are done using a text-index
>   data structure. This removes the heuristics currently used in master,
>   and allows removing byte positions from markers.
>
> In summary, I'd say performance is good, to say the least, in many cases
> better, and it fixes corner cases leading the abysmal performance in
> current master.

This sounds great.  I pushed a couple of typo fixes while reading the
patches, please use them as you see fit (squash, etc.).

- Any chance you could add a comment explaining how you arrived at
  text_index_interval=3D4*1024?  If it's arbitrarily chosen, adding a
  comment to that effect might be useful.

- Maybe rename `text-index-interval` to `text-index--interval` (to
  indicate that it's internal)?

- I guess `use-text-index` can be removed?

> Please see the comments at the start of marker-vector.c and text-index.c
> for more details. Also see the thread(s) on emacs-devel with Stef an me.

For posterity, I guess that would be:

Re: Question about region caches
https://lists.gnu.org/r/emacs-devel/2025-03/msg01382.html

PS. BTW, a small procedural thing.  Instead of merging master into a
    scratch/ branch, I recommend deleting the branch, rebasing it on
    master, and then pushing it again.  This way, when we later merge it
    into master, we avoid the merge commits, and the history is kept
    clean and more easily reviewable.  Not the end of the world either
    way, but something to consider.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 21 Apr 2025 18:37:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 21 14:37:12 2025
Received: from localhost ([127.0.0.1]:38539 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6w12-0001me-4S
	for submit <at> debbugs.gnu.org; Mon, 21 Apr 2025 14:37:12 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:44648)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <rms@HIDDEN>) id 1u6w0y-0001mO-2W
 for 77924 <at> debbugs.gnu.org; Mon, 21 Apr 2025 14:37:08 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <rms@HIDDEN>)
 id 1u6w0s-0004D9-L9; Mon, 21 Apr 2025 14:37:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From:
 mime-version; bh=5xS9Dffv14cSATr9YgccjLjA+b3sqqTPiZ/V0+r/VD0=; b=gZGw+FZzCLZ4
 zSMTj/+/OdH5+NFEVnPd1bBRo2c0sar9GfgpMH0wE6uNcdA002OMPG+T9OyuQfFAFH0cQjcK+4enc
 GmbARUP6qWiYlpcp9yppdJ/0pvMArkF02YBFUr2+u+EaXW0MTp3TKp3KeAyHvdZX8EMPOXqJCBZho
 NZX7speobTnw15tSLit5cS/V9xMue+Ru7TyA1G99Ti178ZIM2cy+jnIjnhQ7GkPq4tFaw028SUAXU
 dn6b1KyQa/PUmSmdaUxW13/nwUDHLPFe69kxGgh4lb4dIEzNOSLEC20uyMgnd0OGbhcw0doeyJiHq
 8wJlNq8tuBJWvadbpLZnCw==;
Received: from rms by fencepost.gnu.org with local (Exim 4.90_1)
 (envelope-from <rms@HIDDEN>)
 id 1u6w0r-00055o-ST; Mon, 21 Apr 2025 14:37:01 -0400
Content-Type: text/plain; charset=Utf-8
From: Richard Stallman <rms@HIDDEN>
To: Gerd =?iso-8859-1?Q?M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
In-Reply-To: <m2jz7gp25p.fsf@HIDDEN> (message from Gerd
 =?iso-8859-1?Q?M=C3=B6llmann?= on Sat, 19 Apr 2025 18:05:38 +0200)
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
References: <m2jz7gp25p.fsf@HIDDEN>
Message-Id: <E1u6w0r-00055o-ST@HIDDEN>
Date: Mon, 21 Apr 2025 14:37:01 -0400
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77924
Cc: monnier@HIDDEN, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: rms@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

The one thing I worry about, regarding this new data structure,
is that allocation of the vectors could get troblesome
wnet there are many markers in a buffer.

I don't know whether that theoretical problem makes a big difference
in practice.  The new scheme may be better.  I just suggest looking at
this question.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 21 Apr 2025 05:41:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 21 01:41:55 2025
Received: from localhost ([127.0.0.1]:58973 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6juk-0004U8-Uv
	for submit <at> debbugs.gnu.org; Mon, 21 Apr 2025 01:41:55 -0400
Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:58800)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u6juh-0004TZ-UO
 for 77924 <at> debbugs.gnu.org; Mon, 21 Apr 2025 01:41:52 -0400
Received: by mail-wm1-x331.google.com with SMTP id
 5b1f17b1804b1-43ce71582e9so29318035e9.1
 for <77924 <at> debbugs.gnu.org>; Sun, 20 Apr 2025 22:41:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745214106; x=1745818906; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=F6n5TN1PKLlo04xHTY14abai59SWJMtQ/1bVxx0oy8A=;
 b=V8ez3hK2hGlaIfZDnNFATHz7DZcSMi3NSkNGCALCZKbHHLfng2lkVw922/3iIPuCkm
 vfVi0V13ftCk0r9grzxDY/mZYPdtfpXHFwdoU4IScCLzub+H1ppKRuj1AtKg1lkrH5ZC
 80wuEZc98YED0B8PRHntd/rjSZpkBfrICOlAvmJOuECizIdFLMKayHug7NyDvtCHaQWq
 s7+7MwJfFPax7qsog0CujOHVsisxiP2d7NUasiw/GTQsi6Vm7juCzPlRdVf82+tO7IDO
 vZs3iG92+yBhXcqRUI2jXBx4BqpCMcH0Fwd5f/yMbdQN/FilrrlM94rNRTuRyzKMkQYQ
 n8Gg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745214106; x=1745818906;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=F6n5TN1PKLlo04xHTY14abai59SWJMtQ/1bVxx0oy8A=;
 b=rm2ylhY3gnZ0Jj/elmDjhCjxeS005VEC+BB4wl0d60I7CRzGla5B/K3t6T215hGmQr
 A6h3+Gpte2YwcmvtR+iv/e/3HOpqqJDbl5o4hDQxAVVZFYLtvGO96lbGnvsfOqOFM8Gt
 PGxMs48WDV90ZwifpqDhffDDYyLDz14n49t6V0dXEqZcXmS3fu4pZY6tp7mwFKEy9b7Q
 hf4L3bzXLxMZeLnSLR3alifp8/qpmh3pK7ZnDYnp4cuaAGtnIDbrBPcIhBATLbQwLbq/
 3Q3vz5NBvgOOhjOyRL376STfgdlyOTIinFV+Ym+HAtfzAhSLWvE14F0O9P/k4ex78f21
 nhJA==
X-Gm-Message-State: AOJu0YyTTmwcL6jvfO1MCU8pcyPr9FVMPI6qfqDll427Bj3VTPw0o+Et
 DYsguw9zFALKHrM6B7Ko1OvVTrqiJsmvHM1zTRREJlNUZuVtvKHm
X-Gm-Gg: ASbGncttXsBGPF9K7JdQHJ1ln99+gDzjtOLe1b+E/6E78Nva1TdfkjHa495ekYiGq60
 Lp2c8bPt/5O9Qe5xLnDG79XQDWKoNqginNJvZXIWTwBoxPYwK8MkjQprLWlSieSPsQnBMlVBG3a
 tjC1dhNZEr6nGo9eJ+r/yZgqC1n7MYFnm9eNn+7M1p7sEQrpDfiP1HEV8nVpWG2bGR4bcq/JORC
 RsGccftMQPSaO47rwr4O75Ei9t6bUF0Ywhec6aryK5qO94b8hPXDL8IWfCfkqjDZ+S949EZ2biv
 +RNy7UxaLbij49NrL4SddRbN1BLmJMorc9NhvzGIB7/fgA4DVClYrXBf49C4L/uV1liewaGgAjK
 qH0aSkjwr8KbdIQM3RftLmpxAVck06f3oX2sh/EysIw==
X-Google-Smtp-Source: AGHT+IFNxg7VP/h/z45CezG4Ozg3U3UH1pW4xZBCaCnTOuVrlOqHp5ZNkmimdwdDg3d/H40nADtTAg==
X-Received: by 2002:a05:6000:40db:b0:390:fb37:1bd with SMTP id
 ffacd0b85a97d-39efbacf35fmr8273929f8f.46.1745214105666; 
 Sun, 20 Apr 2025 22:41:45 -0700 (PDT)
Received: from pro2 (p200300e0b728b60058490051f8c259a0.dip0.t-ipconnect.de.
 [2003:e0:b728:b600:5849:51:f8c2:59a0])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-39efa4332c1sm10579424f8f.27.2025.04.20.22.41.44
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 20 Apr 2025 22:41:45 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <m2plh6dt3q.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN> <86plh86rit.fsf@HIDDEN>
 <m2fri4ozpv.fsf@HIDDEN> <m2r01ndg5r.fsf@HIDDEN>
 <m2y0vv2pva.fsf@HIDDEN> <m2plh6dt3q.fsf@HIDDEN>
Date: Mon, 21 Apr 2025 07:41:43 +0200
Message-ID: <m2ldrudqaw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: monnier@HIDDEN, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:

> I'll fix that a bit later today.

Done.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 21 Apr 2025 04:41:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 21 00:41:25 2025
Received: from localhost ([127.0.0.1]:58583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6iyD-0007L7-2Y
	for submit <at> debbugs.gnu.org; Mon, 21 Apr 2025 00:41:25 -0400
Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:55714)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u6iy9-0007Kr-HJ
 for 77924 <at> debbugs.gnu.org; Mon, 21 Apr 2025 00:41:22 -0400
Received: by mail-wm1-x332.google.com with SMTP id
 5b1f17b1804b1-43cebe06e9eso29897075e9.3
 for <77924 <at> debbugs.gnu.org>; Sun, 20 Apr 2025 21:41:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745210475; x=1745815275; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=a4yctWQ+K5GV/JUIZJYXyGh+x5gT0UW9J6vejl6I/Ko=;
 b=ko1DiD3xUQBF4QVROZi2FXNu/Y8J3b/E6nRZ+dQcuL/iIdfSdQSKoUKPhofKYIyjRn
 z2mXFsFSzrKjKgJ3UB99fnX3wU4EkwtS7wAQ2zhxCMr+5cPN8fT+dfKAcx8021l7jRmd
 d6Cb3Wyn9GLFBKHRL8VSMe7ov3KOyXgit0wZcCTdbW1aiBo9hRQAZ/WHyJt0yopAJJwi
 2qyveVWN5ozaGTVbCnbKYPWy5tln6g0plPH225iuDM53sc5oLKheCqkimmYh+moPJ1zH
 bbSlf47KXkzn+Mhcw9/VFxLL4cCjV3rL7yXwj/LjIVLef5EL6xT6YYNNscpAiI1Zy2GV
 aa0A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745210475; x=1745815275;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=a4yctWQ+K5GV/JUIZJYXyGh+x5gT0UW9J6vejl6I/Ko=;
 b=vvxXTd6iIVxlWFAXGhxC5JsVJVtxnbS8CzLGhKodmhy4pnQNgpqmSyIjEIIqSv9GxE
 FDrykeO86yQ+suJhkpxeWexzov4YMBpj3xFRTJ26I1TrMREV48E4Wa72+u3o9ejhomH6
 keNbeH1CT5WJ5XrhZAs62wj5Pe3cHjINBOiJJLYAzrDP6yGcq8rEMnuV0c+Wr2Lotyf1
 EhOpHkDPEUIcG4CEVuanHS8LlsfmphCZy+ulF+sz21nObd33h1WyBviHyqqOQTY2kjRR
 fRIoUS4t1FhWwd4eAodvKhW0b1Yas/59FCR1t3WneauPjomA0i9F6mB1LY4v/LptF24/
 RQaQ==
X-Gm-Message-State: AOJu0YyXQGD6q++SzatlHooC3Jx32R4WfjZNvyHHPHAfACXM8LSfs54M
 2pLxsRYgZxm0bPI4y5Bxb+deptBbAel9teKE8I48rcQAagsO4QS8SAQmSA==
X-Gm-Gg: ASbGncu/P4IIZS9FMRaGY7w3wmmOCzeS5qDc9d28lq3vA5LMQGYXFVieboGdnZ/B+Zf
 5zr+Uc+LOu+wPdOjcdN4NQkLBwcfvU0MRxziRoTull/Yu1tdzhJKfZV1MMEugHntLN0OtuQ46ZA
 PtHPOsGY54/MiAKoi+onPE3VgEorAqc3UmDGQE7B/7EV04MpEXZ1mzY6lOinVkG1b1VPmqM1TcB
 BwD+ZudVDga/2581ovBP+cn65QDbDwbtPdFx00RbR6GLY1tDe3Qlymt9GIFDc/1cTEbW6fH5ujY
 FaWMJRTduVxALRUiZjcro03c9vwPl/rDAZg31zDp3NRR5Mv4EP4SHnC5DZAUnfPKKQ/HUxqj6FU
 Fa6fmKkDqSl9nhc5n0FwzjP8qKFjpODEERA3bal8a5wnQESw=
X-Google-Smtp-Source: AGHT+IH6QxXfhY7Jvxvgixnjl9phvJiPV0Gef5HHfKJFicazE1K+s8zAobBWnPgvZAGs0zdB8lw7cQ==
X-Received: by 2002:a05:600c:1c9d:b0:43b:ce36:7574 with SMTP id
 5b1f17b1804b1-4406ab93b95mr84252345e9.11.1745210475142; 
 Sun, 20 Apr 2025 21:41:15 -0700 (PDT)
Received: from pro2 (p200300e0b728b60058490051f8c259a0.dip0.t-ipconnect.de.
 [2003:e0:b728:b600:5849:51:f8c2:59a0])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4406d5bbcfesm120509575e9.23.2025.04.20.21.41.14
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 20 Apr 2025 21:41:14 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <m2y0vv2pva.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN> <86plh86rit.fsf@HIDDEN>
 <m2fri4ozpv.fsf@HIDDEN> <m2r01ndg5r.fsf@HIDDEN>
 <m2y0vv2pva.fsf@HIDDEN>
Date: Mon, 21 Apr 2025 06:41:13 +0200
Message-ID: <m2plh6dt3q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: monnier@HIDDEN, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:

> Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:
>
>> Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:
>>
>>> Eli Zaretskii <eliz@HIDDEN> writes:
>>>
>>>> Are there any backward-incompatible changes with this?
>>>
>>> None I'm aware of.
>>>
>>>> Do all the tests still pass as well as they did before these changes?
>>>
>>> I got a SEGV in buffer-tests right now when I checked again that went
>>> away an a second run. So I'll have to check that.
>>
>> SUMMARY OF TEST RESULTS
>> -----------------------
>> Files examined: 530
>> Ran 8041 tests, 7765 results as expected, 0 unexpected, 276 skipped
>> [scratch/text-index] gerd@mini 2025-04-19 22:51
>>
>> Now fixed.
>
> Commit message:

A warning: the branch currently contains a bug that can lead to a stack
overflow that looks like this:

(lldb) bt
* thread #1, queue =3D 'com.apple.main-thread', stop reason =3D EXC_BAD_ACC=
ESS (code=3D2, address=3D0x16b0ffff0)
    frame #0: 0x000000010451bc38 emacs`ensure_charpos_indexed(b=3D0x0000000=
107280d28, charpos=3D4415031360) at text-index.c:356
    frame #1: 0x000000010451bb10 emacs`text_index_charpos_to_bytepos(b=3D0x=
0000000107280840, charpos=3D25980) at text-index.c:621:3
    frame #2: 0x00000001046cc1d0 emacs`marker_vector_bytepos(m=3D0x00000001=
07280d28) at marker-vector.c:323:10
    frame #3: 0x0000000104529aec emacs`marker_byte_position(marker=3D(struc=
t Lisp_Marker *) $52 =3D 0x0000000107280d28) at marker.c:376:29
    frame #4: 0x000000010451cfb4 emacs`BUF_PT_BYTE(buf=3D0x0000000107280840=
) at buffer.h:909:6
!gud 909:6:/Users/gerd/emacs/github/cl-packages/src/buffer.h
  * frame #5: 0x000000010451bdec emacs`narrow_charpos_bounds(b=3D0x00000001=
07280840, prev=3D0x000000016b100178, next=3D0x000000016b100168, charpos=3D2=
5980) at text-index.c:549:42
    frame #6: 0x000000010451bb78 emacs`text_index_charpos_to_bytepos(b=3D0x=
0000000107280840, charpos=3D25980) at text-index.c:628:23
    frame #7: 0x00000001046cc1d0 emacs`marker_vector_bytepos(m=3D0x00000001=
07280d28) at marker-vector.c:323:10
    frame #8: 0x0000000104529aec emacs`marker_byte_position(marker=3D(struc=
t Lisp_Marker *) $52 =3D 0x0000000107280d28) at marker.c:376:29
    frame #9: 0x000000010451cfb4 emacs`BUF_PT_BYTE(buf=3D0x0000000107280840=
) at buffer.h:909:6
    frame #10: 0x000000010451bdec emacs`narrow_charpos_bounds(b=3D0x0000000=
107280840, prev=3D0x000000016b1002c8, next=3D0x000000016b1002b8, charpos=3D=
25980) at text-index.c:549:42
    frame #11: 0x000000010451bb78 emacs`text_index_charpos_to_bytepos(b=3D0=
x0000000107280840, charpos=3D25980) at text-index.c:628:23
    frame #12: 0x00000001046cc1d0 emacs`marker_vector_bytepos(m=3D0x0000000=
107280d28) at marker-vector.c:323:10
    frame #13: 0x0000000104529aec emacs`marker_byte_position(marker=3D(stru=
ct Lisp_Marker *) $52 =3D 0x0000000107280d28) at marker.c:376:29
    frame #14: 0x000000010451cfb4 emacs`BUF_PT_BYTE(buf=3D0x000000010728084=
0) at buffer.h:909:6

The reason for that is that functions like BUF_PT (and maybe others) are
"too smart", in the case of indirect buffers, for what I need in the
text index. I'll fix that a bit later today.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 20 Apr 2025 08:34:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 20 04:34:28 2025
Received: from localhost ([127.0.0.1]:44920 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6Q8B-0006Zo-K9
	for submit <at> debbugs.gnu.org; Sun, 20 Apr 2025 04:34:27 -0400
Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:56820)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u6Q89-0006ZZ-Q1
 for 77924 <at> debbugs.gnu.org; Sun, 20 Apr 2025 04:34:26 -0400
Received: by mail-wm1-x32c.google.com with SMTP id
 5b1f17b1804b1-43edecbfb94so33310055e9.1
 for <77924 <at> debbugs.gnu.org>; Sun, 20 Apr 2025 01:34:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745138059; x=1745742859; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=TH2hoS2oGQcgBuXKJq7NKFRN4T7Zu8gWCvEwogdIpCc=;
 b=JRUt7mlqggMbOQ3C7oQTNFx1Fx0cJ/B0q0NSiU2ktEfS3sXeBMgrbYZXqDuNLBd9g6
 MOgwCpCZVlz8UbMQuSVBndRhstn/uAJn+2mNP6GfEjFZDWs1rpL0qtXIIANCtpHPbBCi
 xRahbxw38TbxlthPLEXTH8XVjYnKgVKSeTrksUvPc2B2lbqxor5sVroA8StYi4OagX5H
 a2ZbG0j6WopAmymQc6bX5THf0ylMPhH+iq/H7uBxtSco2eW6a6eC2LCYzrz1BRYXGxb0
 e7FWjeDRhvzsOGc0FWgNPAUH3LgykljhSkM6rJ4mQrVSvBT2hK6gP6lj5wgu9qYWBDRy
 6NMw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745138059; x=1745742859;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=TH2hoS2oGQcgBuXKJq7NKFRN4T7Zu8gWCvEwogdIpCc=;
 b=nTXSKMS6xoUsNU1ooaRcZMqsSGDvQyIrEZf0Ln2CSTOVg1Um7bS5IC/9pCOvQzwUAM
 Y3PZJMH4oZrddv/jvQ4XLV9SNdevZ+eNvqV1JAprjokjdzp0IY6jSfe6Z84mksB9/sW3
 eJBAm2zgBXVlaJTMcN/xVdz+ujd7NGf7wh/dcRIL9Q8nwJElrj/XoOY8LkS8J+aZV7bE
 H3bP3jBCs5Ghtb/09t6JEA3IcCHMVgcAvzYfdJyvzUSFs1ONZlj2CHXVLWExS3hdcHLi
 O4o66k9b1fjGpG1k+Uburu/n50kRMFMFZR+ZCVeXXAGGbKV+kaaaWV1qJ0bs3SIIBsdn
 3k1w==
X-Gm-Message-State: AOJu0YySSQ67RnMfqIOWSY3J7+R0Dfvpm9GR7UTHT5keyVBgoOTTEA1H
 B4iMOTctkOpzsyfo8zCwdZ0+jKNsgMZ5RnQwFmTgkyWF8BC3HpSI
X-Gm-Gg: ASbGnctqJZtaMWS/+HUc4phxcNk1qODVqCHuBl0gLstBOCdiF9texxaJtQk8p9VySRD
 UuXYiF18FCp7C8d5oc81jXFMKh7P2GepA/JuY1S44tgztSFeFdJ7IZnr4KIeqOKaIJX0/sjCHe1
 bF5uqfrt/kGletypFfyDfU7L1xXlX4CjXLndhWxWi/z9EnDPIqLb3QfcXuayKvVwvGb1Dzrp1h6
 bfocX0t7hSqFbFAAy+nphWSA8zGDXLRXwYYOLG0bMtr/4IycTsQFETsb9zOelFzss5yfeDZVOSc
 kmBoFQc3rSxQ7nY7PM44l/RF/HgE/GpsSvRh1soNe2GZVlcdZLkRGh8Ic6bMcHlHyFsmMt6RV6s
 Ox3D4LN0RjazRMU0aG9YVw/gx14TIyno34DgjLv1M1pGm
X-Google-Smtp-Source: AGHT+IHEQRVFUr7ZBe3VJHoQLi0qX0r5oAnDgX8/OQodcqxeHfsrpfKDf6OnonqIP/dlkcxbcQT/YQ==
X-Received: by 2002:a05:600c:a143:b0:43d:878c:7c40 with SMTP id
 5b1f17b1804b1-44076c9c6fbmr31452725e9.10.1745138059065; 
 Sun, 20 Apr 2025 01:34:19 -0700 (PDT)
Received: from pro2 (p200300e0b720a300c964490db7e76205.dip0.t-ipconnect.de.
 [2003:e0:b720:a300:c964:490d:b7e7:6205])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-39efa4206fasm8138747f8f.2.2025.04.20.01.34.18
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 20 Apr 2025 01:34:18 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <m2r01ndg5r.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN> <86plh86rit.fsf@HIDDEN>
 <m2fri4ozpv.fsf@HIDDEN> <m2r01ndg5r.fsf@HIDDEN>
Date: Sun, 20 Apr 2025 10:34:17 +0200
Message-ID: <m2y0vv2pva.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: monnier@HIDDEN, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:

> Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:
>
>> Eli Zaretskii <eliz@HIDDEN> writes:
>>
>>> Are there any backward-incompatible changes with this?
>>
>> None I'm aware of.
>>
>>> Do all the tests still pass as well as they did before these changes?
>>
>> I got a SEGV in buffer-tests right now when I checked again that went
>> away an a second run. So I'll have to check that.
>
> SUMMARY OF TEST RESULTS
> -----------------------
> Files examined: 530
> Ran 8041 tests, 7765 results as expected, 0 unexpected, 276 skipped
> [scratch/text-index] gerd@mini 2025-04-19 22:51
>
> Now fixed.

Commit message:


--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=text-index-change.log
Content-Transfer-Encoding: base64

TmV3IG1hcmtlcnMsIHRleHQgaW5kZXgsIG1hcmtlciB2ZWN0b3JzIChidWcjNzc5MjQpCgpUaGlz
IGNoYW5nZXMgdGhlIGltcGxlbWVudGF0aW9uIG9mIExpc3AgbWFya2Vycy4KCi0gTWFya2VycyBu
byBsb25nZXIgZm9ybSBhIHNpbmdseS1saW5rZWQgbGlzdCwgdGhleSBhcmUgc3RvcmVkIGluIGEK
ICBtYXJrZXIgdmVjdG9yIGluc3RlYWQgd2hpY2ggYWxsb3dzIE8oMSkgaW5zZXJ0aW9uIGFuZCBk
ZWxldGlvbiBvZgogIG1hcmtlcnMuIChUaGUgaWRlYSBvZiBhIG1hcmtlciB2ZWN0b3IgaXMgZnJv
bSB3aGF0IEkgZGlkIGluIGlnYy4gSW4gbXkKICBFbWFjcywgYm90aCBpZ2MgYW5kIG9sZCBHQyB1
c2UgdGhlIHNhbWUgbWFya2VyIHZlY3RvciBpbXBsZW1lbnRhdGlvbi4KICBUaGUgbmV3IG9uZSBp
cyBkaWZmZXJlbnQgZnJvbSB0aGUgb25lIGluIGZlYXR1cmUvaWdjLikKCi0gTGlzcF9NYXJrZXIg
ZG9lc24ndCBjb250YWluIHRoZSBjaGFyYWN0ZXIgcG9zaXRpb24gZGlyZWN0bHkuIEl0IGlzCiAg
c3RvcmVkIGluIHRoZSBtYXJrZXIgdmVjdG9yIGluc3RlYWQuIFRoaXMgbGVhZHMgdG8gZmFzdGVy
LAogIGNhY2hlLWZyaWVuZGx5LCBtYXJrZXIgcG9zaXRpb24gYWRqdXN0bWVudHMuCgotIE1hcmtl
cnMgZG9uJ3QgY29udGFpbiBieXRlIHBvc2l0aW9ucy4gQnl0ZSBwb3NpdGlvbnMgYXJlIGNvbXB1
dGVkIHdoZW4KICBuZWVkZWQuIEJ5dGVwb3MgPC0+IGNoYXJwb3MgY29udmVyc2lvbiBhcmUgZG9u
ZSB1c2luZyBhIHRleHQtaW5kZXgKICBkYXRhIHN0cnVjdHVyZS4gVGhpcyByZW1vdmVzIHRoZSBo
ZXVyaXN0aWNzIGN1cnJlbnRseSB1c2VkIGluIG1hc3RlciwKICBhbmQgYWxsb3dzIHJlbW92aW5n
IGJ5dGUgcG9zaXRpb25zIGZyb20gbWFya2Vycy4KClBsZWFzZSBzZWUgdGhlIGNvbW1lbnRzIGF0
IHRoZSBzdGFydCBvZiBtYXJrZXItdmVjdG9yLmMgYW5kIHRleHQtaW5kZXguYwpmb3IgbW9yZSBk
ZXRhaWxzLiBBbHNvIHNlZSB0aGUgdGhyZWFkKHMpIG9uIGVtYWNzLWRldmVsIHdpdGggU3RlZiBh
biBtZS4KCiogc3JjL21hcmtlci12ZWN0b3IuW2NoXSwgc3JjL3RleHQtaW5kZXguW2NoXTogTmV3
IGZpbGVzLgoqIHRlc3Qvc3JjL3RleHQtaW5kZXgtdGVzdHMuZWw6IE5ldyBmaWxlLgoKKiBzcmMv
TWFrZWZpbGUuaW4gKGJhc2Vfb2JqKTogQWRkIG1hcmtlci12ZWN0b3IubyBhbmQKdGV4dC1pbmRl
eC5vLgoKKiBzcmMvbGlzcC5oIChnY192c2l6ZSk6IE5ldyBmdW5jdGlvbi4KKHN0cnVjdCBMaXNw
X01hcmtlcik6IFJlbW92ZSBwb3NpdGlvbnMgYW5kIG5leHQgcG9pbnRlci4gQWRkCm1hcmtlciB2
ZWN0b3IgaW5kZXguCgoqIHNyYy9hbGxvYy5jIChGbWFrZV9tYXJrZXIsIGJ1aWxkX21hcmtlcik6
IEFkYXB0IHRvIExpc3BfTWFya2VyCmNoYW5nZXMuCihtYXJrX2J1ZmZlcik6IFNldCBtYXJrZXIg
dmVjdG9yIG1hcmtlZC4KKHVuY2hhaW5fZGVhZF9tYXJrZXJzKTogTmV3IGltcGxlbWVudGF0aW9u
LgoKKiBzcmMvYnVmZmVyLmg6IChzdHJ1Y3QgYnVmZmVyX3RleHQpOiBBZGQgdGV4dCBpbmRleCBh
bmQgbWFya2VyCnZlY3Rvci4KCiogc3JjL2J1ZmZlci5jOiAoRmdldF9idWZmZXJfY3JlYXRlKTog
SW5pdGlhbGl6ZSBidWZmZXIncyB0ZXh0CmluZGV4IGFuZCBtYXJrZXIgdmVjdG9yLgooY2xvbmVf
cGVyX2J1ZmZlcl92YWx1ZXMpOiBHZXQvc2V0IGNoYXJwb3MgdmlhIG1hcmtlciB2ZWN0b3IuCihy
ZWNvcmRfYnVmZmVyX21hcmtlcnMpOiBDYWxsIHNldF9tYXJrZXJfYm90aCB3aXRob3V0IGJ5dGVw
b3MuCihGbWFrZV9pbmRpcmVjdF9idWZmZXIpOiBJbml0aWFsaXplIG93biB0ZXh0J3MgaW5kZXgg
dG8gTlVMTC4KQ2FsbCBidWlsZF9tYXJrZXIgd2l0aG91dCBieXRlcG9zLgooRmtpbGxfYnVmZmVy
KTogVXNlIERPX01BUktFUlMgYW5kIG1hcmtlcl92ZWN0b3JfcmVzZXQuIEZyZWUgdGV4dAppbmRl
eC4KKHN3YXBfYnVmZmVyX292ZXJsYXlzKTogVXNlIERPX01BUktFUlMuCihGc2V0X2J1ZmZlcl9t
dWx0aWJ5dGUpOiBVc2UgRE9fTUFSS0VSUwoKKiBzcmMvY2FsbGludC5jIChGY2FsbF9pbnRlcmFj
dGl2ZWx5KTogQ2FsbCBzZXRfbWFya2VyX2JvdGgKd2l0aG91dCBieXRlcG9zLgoKKiBzcmMvY29k
aW5nLmMgKGRlY29kZV9jb2Rpbmdfb2JqZWN0KTogVXNlIERPX01BUktFUlMuCihkZWNvZGVfY29k
aW5nX29iamVjdCk6IEdldC9zZXQgY2hhcnBvcyB2aWEgbWFya2VyIHZlY3Rvci4gVXNlCkRPX01B
UktFUlMuCgoqIHNyYy9jb21wb3NpdGUuYyAoYXV0b2NtcF9jaGFycyk6IERvbid0IHBhc3MgYnl0
ZXBvcyB0bwpidWlsZF9tYXJrZXIuCgoqIHNyYy9kaXNwZXh0ZXJuLmggKFNFVF9NQVJLRVJfRlJP
TV9URVhUX1BPUyk6RG9uJ3QgcGFzcyBieXRlcG9zCnRvIHNldF9tYXJrZXJfYm90aC4KCiogc3Jj
L2VkaXRmbnMuYyAoRnBvaW50X21hcmtlciwgRnBvaW50X21pbl9tYXJrZXIpOgooRnBvaW50X21h
eF9tYXJrZXIpOiBEb24ndCBidWlsZF9tYXJrZXIgd2l0aCBieXRlcG9zLgooc2F2ZV9yZXN0cmlj
dGlvbl9zYXZlXzEsIHNhdmVfcmVzdHJpY3Rpb25fcmVzdG9yZV8xKToKQ2hhbmdlIHRvIG5vdCB1
c2UgYnl0ZXBvcy4gVXNlIERPX01BUktFUlMuCih0cmFuc3Bvc2VfbWFya2Vycyk6Cih0cmFuc3Bv
c2VfbWFya2Vycyk6Cih0cmFuc3Bvc2VfbWFya2Vycyk6CgoqIHNyYy9lbWFjcy5jIChtYWluKTog
Q2FsbCBpbml0X3RleHRfaW5kZXggYW5kCnN5bW5zX29mX3RleHRfaW5kZXguCgoqIHNyYy9mbnMu
YyAoaW50ZXJuYWxfZXF1YWxfMSk6IERvbid0IHVzZSBtYXJrZXIgYnl0ZXBvcy4KKHZhbHVlX2Nt
cCk6IEJldCBjaGFycG9zIHZpYSBtYXJrZXIgdmVjdG9yLgooc3hoYXNoX29iaik6IERvbid0IHVz
ZSBtYXJrZXIgYnl0ZXBvcy4KCiogc3JjL2luZGVudC5jIChjaGVja19kaXNwbGF5X3dpZHRoLCBy
ZXN0b3JlX3dpbmRvd19idWZmZXIpOgooRnZlcnRpY2FsX21vdGlvbik6IENhbGwgc2V0X21hcmtl
cl9ib3RoIHdpdGhvdXQgYnl0ZXBvcy4KCiogc3JjL2luc2RlbC5jIChhZGp1c3Rfc3VzcGVuZF9h
dXRvX2hzY3JvbGwpOiBHZXQgY2hhcnBvcyB2aWEgbWFya2VyIHZlY3Rvci4KKGFkanVzdF9tYXJr
ZXJzX2Zvcl9kZWxldGUsIGFkanVzdF9tYXJrZXJzX2Zvcl9pbnNlcnQpOgooYWRqdXN0X21hcmtl
cnNfZm9yX3JlcGxhY2UpOiBVc2UgdGV4dCBpbmRleCBmdW5jdGlvbnMuCihjb3VudF9ieXRlcyk6
IFJlbW92ZWQuCihhZGp1c3RfbWFya2Vyc19ieXRlcG9zKTogUmVtb3ZlIGNvZGUgYWRqdXN0aW5n
IGJ5dGVwb3MuCgoqIHNyYy9scmVhZC5jIChyZWFkY2hhciwgdW5yZWFkY2hhcik6IEdldC9zZXQg
Y2hhcnBvc3ZpYSBtYXJrZXIKdmVjdG9yLgoKKiBzcmMvbWFya2VyLmMgKGNhY2hlZF9jaGFyb3Ms
IGNhY2hlZF9ieXRlcG9zLCBjYWNoZWRfYnVmZmVyKToKKGNhY2hlZF9tb2RpZmYpOiBSZW1vdmVk
LgooY2xlYXJfY2hhcnBvc19jYWNoZSk6IEVtcHRpZWQuCihidWZfYnl0ZXBvc190b19jaGFycG9z
LCBidWZfY2hhcnBvc190b19ieXRlb2lzKTogVXNlIHRleHQKaW5kZXguIFJlbW92ZSBvbGQgaW1w
bGVtZW50YXRpb24uCihGbWFya2VyX3Bvc2l0aW9uLCBGbWFya2VyX2xhc3RfcG9zaXRpb24pOiBH
ZXQgY2hhcnBvcyB2aWEgbWFya2VyIHZlY3Rvci4KKGF0dGFjaF9tYXJrZXIpOiBSZW1vdmUgYnl0
ZXBvcyBwYXJhbWV0ZXIuCihzZXRfbWFya2VyX2ludGVybmFsKTogRG9uJ3QgdXNlIGJ5dGUgcG9z
aXRpb25zLgooc2V0X21hcmtlcl9ib3RoKTogUmVtb3ZlIGJ5dGVwb3MgcGFyYW1ldGVyLiBEb24n
dCBhY3Qgb24gYnl0ZXBvcy4KKHNldF9tYXJrZXJfcmVzdHJpY3RlZF9ib3RoKTogRG9uJ3QgdXNl
IGJ5dGUgcG9zaXRpb25zLgooc2V0X21hcmtlcl9yZXN0cmljdGVkX2JvdGgpOiBSZW1vdmUgYnl0
ZXBvcyBwYXJhbWV0ZXIuCih1bmNoYWluX21hcmtlcik6IFVzZSBtYXJrZXIgdmVjdG9yLgoobWFy
a2VyX3Bvc2l0aW9uLCBtYXJrZXJfYnl0ZV9wb3NpdGlvbik6IFVzZSBtYXJrZXIgdmVjdG9yLgoK
KiBzcmMvcGR1bXBlci5jIChkdW1wX21hcmtlcik6IEFkYXB0IHRvIGNoYW5nZXMgaW4gTGlzcF9N
YXJrZXIuCihkdW1wX2J1ZmZlcik6IEFkYXB0IHRvIGNoYW5nZXMgaW4gc3RydWN0IGJ1ZmZlcl90
ZXh0LgoKKiBzcmMvcHJpbnQuYyAocHJpbnRfZmluaXNoKTogQ2FsbCBzZXRfbWFya2VyX2JvdGgg
d2l0aG91dCBieXRlcG9zLgoKKiBzcmMvcHJvY2Vzcy5jICh1cGRhdGVfcHJvY2Vzc19tYXJrLCBy
ZWFkX3Byb2Nlc3Nfb3V0cHV0X2FmdGVyX2luc2VydCk6CihGaW50ZXJuYWxfZGVmYXVsdF9wcm9j
ZXNzX3NlbnRpbmVsKTogQ2FsbCBzZXRfbWFya2VyX2JvdGggd2l0aG91dApieXRlcG9zLgoKKiBz
cmMvdW5kby5jIChyZWNvcmRfbWFya2VyX2FkanVzdG1lbnRzKTogR2V0IGNoYXJwb3MgdmlhIG1h
cmtlcgp2ZWN0b3IuCgoqIHNyYy93aW5kb3cuYyAoc2VsZWN0X3dpbmRvd18xLCB3aW5kb3dfcG9p
bnQpOgooRmRlbGV0ZV9vdGhlcl93aW5kb3dzX2ludGVybmEsIHNldF93aW5kb3dfYnVmZmVyKToK
KHRlbXBfb3V0cHV0X2J1ZmZlcl9zaG93LCBGc3BsaXRfd2luZG93X2ludGVybmFsKToKKHdpbmRv
d19zY3JvbGxfZm9yX2xvbmdfbGluZXMsIHdpbmRvd19zY3JvbGxfcGl4ZWxfYmFzZWQpOgood2lu
ZG93X3Njcm9sbF9saW5lX2Jhc2VkLCBzY3JvbGxfY29tbWFuZCk6CihGcmVjZW50ZXIsIEZtb3Zl
X3RvX3dpbmRvd19saW5lLCBGc2V0X3dpbmRvd19jb25maWd1cmF0aW9uKToKKEZzZXRfd2luZG93
X2NvbmZpZ3VyYXRpb24sIEZzZXRfd2luZG93X2NvbmZpZ3VyYXRpb24pOgooc2F2ZV93aW5kb3df
c2F2ZSk6IERvbid0IHBhc3MKYnl0ZXBvcyBwYXJhbSB0byBzZXRfbWFya2VyXyogZnVuY3Rpb25z
LCBidWlsZF9tYXJrZXIgZXRjLgoKKiBzcmMveGRpc3AuYyAoRmJ1ZmZlcl90ZXh0X3BpeGVsX3Np
emUsICBtZXNzYWdlX2RvbG9nKToKKHdpdGhfZWNob19hcmVhX2J1ZmZlciwgdW53aW5kX3dpdGhf
ZWNob19hcmVhX2J1ZmZlcik6CihyZXNpemVfbWluaV93aW5kb3csIGZvcm1hdF9tb2RlX2xpbmVf
dW53aW5kX2RhdGEpOgoocmVkaXNwbGF5X3dpbmRvdywgcmVkaXNwbGF5X3dpbmRvdywgcmVkaXNw
bGF5X3dpbmRvdyk6Cih0cnlfd2luZG93KTogRG9uJ3QgdXNlIG1hcmtlciBieXRlcG9zLCBwYXNz
IGJ5dGVwb3MgcGFyYW0gdG8Kc2V0X21hcmtlcl8qIGZ1bmN0aW9ucywgZXRjLgo=
--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 19 Apr 2025 20:56:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 16:56:32 2025
Received: from localhost ([127.0.0.1]:38678 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6FEk-00071s-ON
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 16:56:32 -0400
Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:44308)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u6FEe-000709-Tv
 for 77924 <at> debbugs.gnu.org; Sat, 19 Apr 2025 16:56:27 -0400
Received: by mail-wr1-x436.google.com with SMTP id
 ffacd0b85a97d-39efc1365e4so739930f8f.1
 for <77924 <at> debbugs.gnu.org>; Sat, 19 Apr 2025 13:56:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745096179; x=1745700979; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=gBhlG0sauO9gvuFz1FvZBSwGf51snW/0rypj0VQNIm0=;
 b=Lz2W02vwQ/cXY4lo3gWmJBnHwpfDwmFuhHV+Pgk8sW9NNrugqHfqcSjubqBvQuR2DJ
 gAaufwYmE2hLgYhpI7FQ4wZ6CF76Eg+d4cKSTV70FXp/ucF5rJbEnsd74DRWCoTNmwOs
 +GGOwucui0vw0uCQ6NwDcju7J5jP01g43tpTpcYR405l0UUrTGY9/w+GaNgE3Ww2UUq6
 k4V+SChYdlQDqaYII5uE6Er8adldZLzc3V1sahGCpRFjdMFNSimJLdkyQzGCGZD3wR/k
 d2oekDZTqrUiDRnk/oXyKctuSCAlOs9LkjAvCXhRDxrY9hxqJ/odtQLuCA+nWRp/Jk3k
 nF7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745096179; x=1745700979;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=gBhlG0sauO9gvuFz1FvZBSwGf51snW/0rypj0VQNIm0=;
 b=ebECDxSX+GYRlYlA2icr/9w0lB0Eo288jL7sE5A/DkSQ2c0OT5Bx10L1FdpmVcq+We
 O7KFWkTDdx9Lt6Ejtg+YfJjVCd5ioULw7FHalwqYi/B99hrootX+dxBVXMZ+wbnl5xjj
 TKJ/EhVYURDuNYFEeB8rXt+WBHEprkQ/b1lcK1451Lfd+9MndBMG4BBXGkbFujRv4qhg
 5SkLPw1zFYhdOzC6ljUUGbo8w7SZaCHLiOmJezKCKaYxTTOv56HbKJbsXc6EjXS19fSG
 jvJrqKHYKPgg5SrLQgxnnTgbAnhMEmoNALNag0iHYVjp1axJGSoAckpVCRa9m91/QRh+
 QRow==
X-Gm-Message-State: AOJu0Yx3a/NeP0+LbYn6//Td9xYNheLShVdOIcR2qqdnH+pb7b8i3rzV
 v/Sv4pTg14WYzjIckMIzI/hB19R59wYwtNy3YM0e335Hqw4IzYB9
X-Gm-Gg: ASbGnctZhTIXpzIH7jnyXzwHVpEG9ZNk00bDbILevrfv1MIrIBX3u1pxMymoIJZFs9J
 yIkmI2VCk193iqeZNN9kf7TSlXaV2sSwP9TrbYKFAlruy1F5kwKO6u76nG5xEiZ4BpC6SmwNVmU
 BnrrcH98vfdbZEs6xgk0E0JBqGMltNj+Yotd3YQSVJoVpT1BXzlMAUV8PCTaXHk7CQYAR6W8Iuv
 tirNwS09vRkRd3j28iRdDDbKedr806EjeDWoFs+JzmpwcyInSjMXu+0u/LOExH/tTnCpN1Z1c6t
 nUGxE6dIQMkckfiScLZ1K3phsvPUrrI913rFCOZdnfj/4BJ35mvU3gHFJ/PDa/BHOtqYqwNwp4n
 pD37TLWLSN1ujYR3RmWuY8B9tbRNSDPmfNYlJVgd88rnc2GUI7w==
X-Google-Smtp-Source: AGHT+IF6vB7I9hX7Mh23zeK99E4EXD8Z+iuiuFlgX/fdvNQD2VrwhZeG2KFN/SzOH7RSGQiwAr86gw==
X-Received: by 2002:a05:6000:4012:b0:390:f9d0:5e3 with SMTP id
 ffacd0b85a97d-39efba37dbfmr5596446f8f.1.1745096178459; 
 Sat, 19 Apr 2025 13:56:18 -0700 (PDT)
Received: from pro2 (p200300e0b7179a00edfd9109c079612a.dip0.t-ipconnect.de.
 [2003:e0:b717:9a00:edfd:9109:c079:612a])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-39efa43c023sm6771029f8f.46.2025.04.19.13.56.16
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 19 Apr 2025 13:56:18 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <m2fri4ozpv.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN> <86plh86rit.fsf@HIDDEN>
 <m2fri4ozpv.fsf@HIDDEN>
Date: Sat, 19 Apr 2025 22:56:16 +0200
Message-ID: <m2r01ndg5r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: monnier@HIDDEN, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Gerd M=C3=B6llmann <gerd.moellmann@HIDDEN> writes:

> Eli Zaretskii <eliz@HIDDEN> writes:
>
>> Are there any backward-incompatible changes with this?
>
> None I'm aware of.
>
>> Do all the tests still pass as well as they did before these changes?
>
> I got a SEGV in buffer-tests right now when I checked again that went
> away an a second run. So I'll have to check that.

SUMMARY OF TEST RESULTS
-----------------------
Files examined: 530
Ran 8041 tests, 7765 results as expected, 0 unexpected, 276 skipped
[scratch/text-index] gerd@mini 2025-04-19 22:51

Now fixed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 19 Apr 2025 16:58:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 12:58:30 2025
Received: from localhost ([127.0.0.1]:36341 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6BWQ-0007NG-2N
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 12:58:30 -0400
Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:45189)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u6BWN-0007Mt-Nq
 for 77924 <at> debbugs.gnu.org; Sat, 19 Apr 2025 12:58:28 -0400
Received: by mail-wm1-x333.google.com with SMTP id
 5b1f17b1804b1-43cfebc343dso22539975e9.2
 for <77924 <at> debbugs.gnu.org>; Sat, 19 Apr 2025 09:58:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745081901; x=1745686701; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=60PrrnpWeSVE/nv5wmLOv1p4KC+SIWuq8eDu/MjvDMs=;
 b=BNFL2F0vga7tz8iVOM0z2hPg/NmGAtMwCXEwMQUGBeIZWDmF25Hb0ljI5YkDtjFlID
 JCrftjHphgHAMFdsLS9H3Hq2OOrArsg93zgptyaZB79dGymZTJjl9hhoEEE5GmI/H34Y
 Rw149wfIYBjrJkgISCgPF3XaJeez8vDZROjGk1qbiGkNUx4c+YRhUbDN44gVJaIqQhTM
 Vg1/wPgedni09+Lz3uNOC6MXaZlSfSFHTQ2xLthCeWSzQcLVJqMDkifYdkppX0PKF9iQ
 XA080LfSGdVvFDRX0PmxeLV097PC0NW22eh77xvPBM8fhgZlmrF8gfgwcpmKOL+/rVXC
 lZlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745081901; x=1745686701;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=60PrrnpWeSVE/nv5wmLOv1p4KC+SIWuq8eDu/MjvDMs=;
 b=h9CVCODiU9F8oSQYgDRfCM1HKZR/C6yoXi1NQkaYNyi+AMV18iRt0zrYlYCdH2expS
 DX1o/yarped2BnBht9ZTP1S7ygSflIyhMB2tzIdJSoFaa7Y2QG+MTV8J0Fj/1zkkiw0m
 lx7FExv2zkwXk2QJBLsd9tc1E3weY/ftuR9hdmVC/+7YkZxHWFZPpgyVGBFUkRX0aBWb
 9xaC/vvJ0xLcvnx41Cxrtb182zTAunExQKvko7RBex+X/50N29lHOyHIMBi6FbgBzRMx
 Q6zF4ZRj+lUAHxaCCHYzmSeaMgYjmSlxGXUu9i1ZYP0DU/lcqJws+GitqVQkFCEwECVb
 y0MQ==
X-Gm-Message-State: AOJu0YzmWm6zWISk+ttHy3OtiXUs8Gq7J2iKmNMfaizAQau0t41FcUhb
 8+zJfb+cTxWmp6xRgFggdaiEjqDBQ+zzaQhZbMJSBoeUIMGrhW0L
X-Gm-Gg: ASbGncsvydegQj599fV9fMGD4kzdSx4d9U3XmHDyP+p2hEsHokXzwoTcmBOkWAITzzb
 9yBAg9KaNKpbeKAakj44dhY6nlartDkZ3vXLbQ8MNeB+qa1pdCHtdlf/j4uYfFoSITiqUn6nlQ3
 uI6Mvvm8FluSVothHg4e+tEf1UcDqcl31YmhyMU5EUgIrIvKY4MNtljrod6PNcUJRjwZrzco4HX
 Eg5gYZIGNpt2r84lT8h2hAsSsgUSunPVyHlgM2wDL0KI2eWbCx5RP6uvJLD2MFcSqRbph/Oc1dW
 DE7yTy4C3IgCMgaL9EXOJN+nyZsfvmS9/ccylbP4gdfuggK56vWN207Xy5QGIui9oW37F0hTj0C
 BZXDrya7mgQSBIyW5aVqkqjo3Zik/f5/hNEOL8vcnY70AAJPq3w==
X-Google-Smtp-Source: AGHT+IFtiiUDHtp/y9OET7/E4nnTbUsp2FSclehAVron4Ih2hIs47dyPUMSEeGq197A0b539ftcWYQ==
X-Received: by 2002:a5d:584e:0:b0:391:39fb:59c8 with SMTP id
 ffacd0b85a97d-39efba5f83dmr5418865f8f.25.1745081901313; 
 Sat, 19 Apr 2025 09:58:21 -0700 (PDT)
Received: from pro2 (p200300e0b7179a00edfd9109c079612a.dip0.t-ipconnect.de.
 [2003:e0:b717:9a00:edfd:9109:c079:612a])
 by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-4406d5aa100sm68414465e9.7.2025.04.19.09.58.20
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 19 Apr 2025 09:58:20 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
In-Reply-To: <86plh86rit.fsf@HIDDEN>
References: <m2jz7gp25p.fsf@HIDDEN> <86plh86rit.fsf@HIDDEN>
Date: Sat, 19 Apr 2025 18:58:20 +0200
Message-ID: <m2fri4ozpv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77924
Cc: monnier@HIDDEN, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> Are there any backward-incompatible changes with this?

None I'm aware of. 

> Do all the tests still pass as well as they did before these changes?

I got a SEGV in buffer-tests right now when I checked again that went
away an a second run. So I'll have to check that.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at 77924 <at> debbugs.gnu.org:


Received: (at 77924) by debbugs.gnu.org; 19 Apr 2025 16:32:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 12:32:54 2025
Received: from localhost ([127.0.0.1]:36106 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6B7e-0004nH-EZ
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 12:32:54 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:49620)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u6B7b-0004n3-Mr
 for 77924 <at> debbugs.gnu.org; Sat, 19 Apr 2025 12:32:52 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u6B7W-00062t-8V; Sat, 19 Apr 2025 12:32:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=El/ssJyA02Ev9E3Zg0NjcTNEwerkL9i4ebQ+VsAUxCk=; b=G/mH79Rauci8m91MQrba
 Q1ELhD1JxiFl05aNoWJDyotMTne9CQGzUg1ckr4Tj+EpMKpsCLajNa+QgCrHO4Ix1HR76YNXQ1Y3O
 xst8hQl0ohRg6fw8WvYZfhilbmw0RPV5KManX1vV0UYnu3iYVkBX74ZyTWx82veu8cnNXfQsCGkT+
 1G0yyBwkNkPHgZjyUFJJCBrAs6wEmgIsFg07Y6qNAc/nfU3O+Slc3o9yCfeOqOIHjnW+UN5NyINH1
 LZzdBCuAxak30V1bDI8G7Xcy8osG+QkclbaSF3iGSZomxl/lKsJmnoioYCHZuHkoxnn2xePRWIVaj
 znfQiC3O4wjaEw==;
Date: Sat, 19 Apr 2025 19:32:42 +0300
Message-Id: <86plh86rit.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gerd =?iso-8859-1?Q?M=F6llmann?= <gerd.moellmann@HIDDEN>
In-Reply-To: <m2jz7gp25p.fsf@HIDDEN> (message from Gerd
 =?iso-8859-1?Q?M=F6llmann?= on Sat, 19 Apr 2025 18:05:38 +0200)
Subject: Re: bug#77924: 31.0.50; [Feature branch] Change marker implementation
References: <m2jz7gp25p.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77924
Cc: monnier@HIDDEN, 77924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Stefan Monnier <monnier@HIDDEN>
> From: Gerd Möllmann <gerd.moellmann@HIDDEN>
> Date: Sat, 19 Apr 2025 18:05:38 +0200
> 
> This is about the branch scratch/text-index on savannah, which is a port
> of what I have in my Emacs.
> 
> The branch changes the implementation of Lisp markers.
> 
> - Markers no longer form a doubly-linked list, they are stored in a
>   marker vector instead which allows O(1) insertion and deletion of
>   markers. (The idea of a marker vector is from what I did in igc. In my
>   Emacs, both igc and old GC use the same marker vector implementation.
>   The new one is different from the one in feature/igc.)
> 
> - Lisp_Marker doesn't contain the character position directly. It is
>   stored in the marker vector instead. This leads to faster,
>   cache-friendly, marker position adjustments.
> 
> - Markers don't contain byte positions. Byte positions are computed when
>   needed. Bytepos <-> charpos conversion are done using a text-index
>   data structure. This removes the heuristics currently used in master,
>   and allows removing byte positions from markers.
> 
> In summary, I'd say performance is good, to say the least, in many cases
> better, and it fixes corner cases leading the abysmal performance in
> current master.
> 
> Please see the comments at the start of marker-vector.c and text-index.c
> for more details. Also see the thread(s) on emacs-devel with Stef an me.

Thanks.

Are there any backward-incompatible changes with this?

Do all the tests still pass as well as they did before these changes?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Apr 2025 16:05:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 19 12:05:55 2025
Received: from localhost ([127.0.0.1]:35845 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u6AhW-0002fW-Mo
	for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 12:05:55 -0400
Received: from lists.gnu.org ([2001:470:142::17]:47548)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u6AhT-0002ez-DS
 for submit <at> debbugs.gnu.org; Sat, 19 Apr 2025 12:05:52 -0400
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 <gerd.moellmann@HIDDEN>)
 id 1u6AhL-00022J-A0
 for bug-gnu-emacs@HIDDEN; Sat, 19 Apr 2025 12:05:43 -0400
Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <gerd.moellmann@HIDDEN>)
 id 1u6AhJ-0001u7-IH
 for bug-gnu-emacs@HIDDEN; Sat, 19 Apr 2025 12:05:42 -0400
Received: by mail-wr1-x42d.google.com with SMTP id
 ffacd0b85a97d-3995ff6b066so1445179f8f.3
 for <bug-gnu-emacs@HIDDEN>; Sat, 19 Apr 2025 09:05:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745078740; x=1745683540; darn=gnu.org;
 h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=DvMWM75l2U6mBu9r6RI09XZGJ8BeZ9oW08Ahx2iBeDc=;
 b=joLA6D12WSwx7Brq7GA3sJf+IgHNYI01UCqq77P7Lrp4erwmqwc+EKv/KvaT9gnvQF
 oJzgEG3x0cwsOkmRSYkAOs+DMoVsp4m53+V8XRU2LRx4Fmq9/yebHJops+Zfc379py4R
 sHyvQQvk1FQOe2BOTZzqdgrgJde0ZeIKReIA6bBDWCUXX7PYu7D6d7+iSpTK4H5oZhbj
 +b9KT+bNvSll2dtnV6ZIuolMDeABUPRVVdRn0SUHiPsaL2M3HpLArp/dCKX09Q9ew/O9
 AC9/97fXNrWC68OtJv1UwOF7tGLHXq06g/RhUVBKqMkXtNSMMuQzk48wwwt8zge4xai0
 IygA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745078740; x=1745683540;
 h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=DvMWM75l2U6mBu9r6RI09XZGJ8BeZ9oW08Ahx2iBeDc=;
 b=TAbEqyxUh2cP0XPCA4IjzO1y+v9zLfyWmEQACHavh3Jcm9AZaLqZg+ZDs0lsUQQKU9
 IrGqzaKDWcA0bqOQHn2Z0vLX/MRDbRW5vucEESv1eYZ6c3Xq5WUnJjIem6GwR08SHcFC
 I0UKRZY5VwCs8vSbGa60fEILVrFkM+hhgOhfgNS/HMluUrkL7Lq6H9GmLKRkduIv4Vox
 Hx0RWcraFTnpw8MTr/u7FIurUk8IckrAoT6o5Xt6Vn+80r7+hNBJaJvOV4c780H4y5hx
 khmlXQ/FUt2q1lTGi/l0R3kqhJ5JFoPmDSVeHDsW+JDyveXqMSLPU5EuFqkq6YGE4H8r
 j0aw==
X-Gm-Message-State: AOJu0YwjBZo8XM0d11vN9adfMF9+uo/16IofgB21PTBxloH8I4xI3brB
 elBH/t9lsmaBcm7Gm6OaYZXsgU16C3GVPYz9HsqHJ/NNWwx82j2XMcVi/bqu
X-Gm-Gg: ASbGncu3xsFGMYrLDKjrOI6Siho2dtopg1xy01sMOPnC2GPylOg2ZFVyERC7KZraVn/
 XJNgUqm8UAciqBY4B5CWRmgDecLZ2tOjbBducyh9iDtFRpwkona3nfsG/qsEH3vsGEu2Wh8HhhM
 xXafeMAZ+5ohdnl6XFDsOw8nMy5rymZRBfHPTplX2Nrw5juMsiHuikqsf+J/cjdQG8P/6iJ9yom
 h6rI/y5O3jBMOg5DZtWSjpVNbI2wVHhI7XsLej+DL2ISiBADFLpMmb8u2pGC8NZ3E566hcIznAR
 3FMyzHCTUvHkdL7zrNI8oiEaX5xeZAQw9qhaSo0u18dj4lqInfeUoJGL799j1Ff5C2Fa7QsK3Ov
 RsMBu1XaZsfpls0nmGgLTGWka1yZdvR+myIi8e1m8l/zB/xilWA==
X-Google-Smtp-Source: AGHT+IHAjkDYwqb0EjtFZ0JrL4ORcyAtyACfBgQrtaugqkk2cEKWIdQJeT0gYkEcpWMX8ZMPo9dDXw==
X-Received: by 2002:a05:6000:4284:b0:391:3028:c779 with SMTP id
 ffacd0b85a97d-39efbae3ff8mr4914368f8f.45.1745078739497; 
 Sat, 19 Apr 2025 09:05:39 -0700 (PDT)
Received: from pro2 (p200300e0b7179a00edfd9109c079612a.dip0.t-ipconnect.de.
 [2003:e0:b717:9a00:edfd:9109:c079:612a])
 by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-39efa4235dasm6166630f8f.9.2025.04.19.09.05.38
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 19 Apr 2025 09:05:39 -0700 (PDT)
From: =?utf-8?Q?Gerd_M=C3=B6llmann?= <gerd.moellmann@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; [Feature branch] Change marker implementation
X-Debbugs-Cc: 
Date: Sat, 19 Apr 2025 18:05:38 +0200
Message-ID: <m2jz7gp25p.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::42d;
 envelope-from=gerd.moellmann@HIDDEN; helo=mail-wr1-x42d.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.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, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

This is about the branch scratch/text-index on savannah, which is a port
of what I have in my Emacs.

The branch changes the implementation of Lisp markers.

- Markers no longer form a doubly-linked list, they are stored in a
  marker vector instead which allows O(1) insertion and deletion of
  markers. (The idea of a marker vector is from what I did in igc. In my
  Emacs, both igc and old GC use the same marker vector implementation.
  The new one is different from the one in feature/igc.)

- Lisp_Marker doesn't contain the character position directly. It is
  stored in the marker vector instead. This leads to faster,
  cache-friendly, marker position adjustments.

- Markers don't contain byte positions. Byte positions are computed when
  needed. Bytepos <-> charpos conversion are done using a text-index
  data structure. This removes the heuristics currently used in master,
  and allows removing byte positions from markers.

In summary, I'd say performance is good, to say the least, in many cases
better, and it fixes corner cases leading the abysmal performance in
current master.

Please see the comments at the start of marker-vector.c and text-index.c
for more details. Also see the thread(s) on emacs-devel with Stef an me.





Acknowledgement sent to Gerd Möllmann <gerd.moellmann@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#77924; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 23 Apr 2025 13:30:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.