From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Exposing buffer text modifications to Lisp Date: Sat, 25 Jun 2022 12:54:36 +0800 Message-ID: <87bkuhwdf7.fsf@localhost> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19249"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Basil L. Contovounesios" , casouri@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 25 06:54:43 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 1o4xoh-0004nD-9Y for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 06:54:43 +0200 Original-Received: from localhost ([::1]:47980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4xof-0000FZ-Nq for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 00:54:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4xnV-0007ze-Hx for emacs-devel@gnu.org; Sat, 25 Jun 2022 00:53:29 -0400 Original-Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:35604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4xnT-00043J-Sb; Sat, 25 Jun 2022 00:53:29 -0400 Original-Received: by mail-pf1-x42d.google.com with SMTP id x4so4244918pfq.2; Fri, 24 Jun 2022 21:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=GetC8zx9TF2WBT//Rn3SvWkgFj51iali9r4gqHQqqY0=; b=AhL9KiftSkKxzIp9MLRJhK7ETTq5//0m4slh8OyUrW7yMFR17250XvzpgAVPuiSC0N mCRYwqtMDlU/g0jc/nDcj+Sbuj79Xc86hzwLw1tkqDsIhbJaH1ndmR+j95i+FLhO95hB aXWf+wlQw8A+SlOKzTjk28RRBl0YY++ro84zjM3XUkM5ZEtqAYGdpI8ckrUHM0v48/cy qgx4Y9yHw+aXnY1skmLhBS8VYJQF0QSHaPOgepQPsWnDAejtSE4Ru37G4iaScVUUoRJx sG5n+NzAVq8F3Wlrz/dB2M6Fu6Ae9q5tIKNHoN4Scf67GWui/lVpldFQNMkjMlfpv+3W KoGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=GetC8zx9TF2WBT//Rn3SvWkgFj51iali9r4gqHQqqY0=; b=idKXPT+pBU2aixZ8U3dmy4mdFGBcMJkeQ5E/r3rCFI8Hf+4zCRA+c3q4GpwG61tUjj sPpOXleM0d3dZdhCzc7z/sqKJU2T8fiORMiC3gB/jtq7eRO0k7Kziypv/rQteg2AeXeY Wct+FFQS7l2Z+FmJ5iPotlsjGFI15Ogl824+vQVemQanJ1OV+daiTaDRGmqzLoYaoQeb 9JAMhIMIJYlLEDFnv7D7uv7Z1huYT17H6QZQuhAsJv4wHcIDCfMqAZKRiRXOpM0KwXyv WVgdN/XfCwr6tQgINs72q/qbUHeVVJNbGqmd0crGJfJSZ2cKE21woneOIomWv19cWw5Z 7e+Q== X-Gm-Message-State: AJIora/yEvIv2raMU5cRjLusRMyoAXfhn39g+gR3a1/70rYOxcFABYnS aGk33Iy09sB38JmqSGAxaMP9Ory6Q6Es6fZ1 X-Google-Smtp-Source: AGRyM1ui1RsrFBtRWEB312UApXOmCrgdkkO/gm5rsNhiqgAS+ki5X4EM0z4qSSf2w4V3oeoFLKEVUA== X-Received: by 2002:a63:4a4e:0:b0:401:baa6:d695 with SMTP id j14-20020a634a4e000000b00401baa6d695mr2223695pgl.259.1656132805825; Fri, 24 Jun 2022 21:53:25 -0700 (PDT) Original-Received: from localhost ([192.161.177.252]) by smtp.gmail.com with ESMTPSA id bg14-20020a056a001f8e00b0051853e6617fsm97762pfb.89.2022.06.24.21.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 21:53:25 -0700 (PDT) In-Reply-To: <83v8ssisll.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:291576 Archived-At: 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 because /* If this buffer has as many characters as bytes, each character must be one byte. This takes care of the case where enable-multibyte-characters is nil. */ if (best_above == best_above_byte) return bytepos; 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. Best, Ihor