From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Exposing buffer text modifications to Lisp Date: Sat, 25 Jun 2022 08:46:06 +0300 Message-ID: <83wnd5b8ip.fsf@gnu.org> References: <2c2746e5f2558a87e8eab6f0914264a020173a9d.camel@pm.me> <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> <0E9E702B-B07C-4794-8498-29B9320E14CC@gmail.com> <871qvorqvv.fsf@localhost> <83tu8jq2vl.fsf@gnu.org> <87sfo37etn.fsf@localhost> <834k0jplcm.fsf@gnu.org> <878rpuwm9w.fsf@localhost> <83mteao3oj.fsf@gnu.org> <87edzmv3i0.fsf@localhost> <83k09eo1p5.fsf@gnu.org> <878rpuv17q.fsf@localhost> <83fsk2nyrm.fsf@gnu.org> <878rpr4kd4.fsf@localhost> <8335fzms6q.fsf@gnu.org> <87h74cya4u.fsf@tcd.ie> <83v8ssisll.fsf@gnu.org> <87bkuhwdf7.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29515"; mail-complaints-to="usenet@ciao.gmane.io" Cc: contovob@tcd.ie, casouri@gmail.com, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 25 07:50:19 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o4ygS-0007To-Mz for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 07:50:16 +0200 Original-Received: from localhost ([::1]:39498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4ygQ-00019o-Ug for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 01:50:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4ycc-0007rn-Ea for emacs-devel@gnu.org; Sat, 25 Jun 2022 01:46:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4yca-0008M4-RP; Sat, 25 Jun 2022 01:46:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=T9ox5uZaZdMBARq96DIiqVbBoWDJZGJOR8XfKYEkIu8=; b=deqXA7IGNnhW JSmARPUv06Ah2kTGmcMXcdlh4Vyc5CWFewx9DvnDmxu7n53HVuSyuB1/xZWtNACfX/4sVMmMg60S4 A1D1s8CIE5UI8d3Y1vKlVKilwmhnY779U4WVprpViei6P3Dbesgy5UDvOSJ8bBHfDjDpfjoCtqXwK cdG230hXL5QPYEaSkWN4O9TwVAOeeK/VK/32CwUQHteyGpuBBhZRaT4JDQUQYhNlljQzHEtJgAFnd tKrv3b2jQGjql/btRacf97dshSu1+jShaLea7lIYcxCAsv71tdS0wjahrBCXSRnXah0gZlMcK/tKT x1uPhhubyylpQUBGCLQ96A==; Original-Received: from [87.69.77.57] (port=3388 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4ycV-0006nf-9s; Sat, 25 Jun 2022 01:46:15 -0400 In-Reply-To: <87bkuhwdf7.fsf@localhost> (message from Ihor Radchenko on Sat, 25 Jun 2022 12:54:36 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291579 Archived-At: > From: Ihor Radchenko > Cc: "Basil L. Contovounesios" , casouri@gmail.com, > emacs-devel@gnu.org > Date: Sat, 25 Jun 2022 12:54:36 +0800 > > Eli Zaretskii writes: > > > Btw, do we have recipes for measuring the effects of changing the data > > structures used for markers? If we do have such recipes, did someone > > try to compare the performance in plain-ASCII Org buffers (where the > > conversion is trivial and shouldn't even access the markers) and > > non-ASCII buffers? Inserting a single non-ASCII character somewhere > > in an otherwise plain-ASCII buffer should show the effect of many > > markers on the likes of CHAR_TO_BYTE. > > AFAIK, buf_bytepos_to_charpos should take no time on plain-ASCII buffers Yes, that's what I said above. > The recipe of measuring the effects is in > https://list.orgmode.org/orgmode/scedec$2g0$1@ciao.gmane.io/ > > That email literally provides Elisp code to run in order to measure the > effect. Thanks. However, that Lisp includes Org code, and I wonder why is that relevant and how it could affect the results. Using regexp search shouldn't need any Org code, and is quite simple to write, I think. The main problem is to find a recipe that puts many markers in a buffer. If this is what the Org code in that recipe is about, then it's one situation where benchmarking ASCII vs non-ASCII buffers will help. Another use case is a buffer with a lot of overlays.