From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Markers in a gap array Date: Thu, 04 Jul 2024 09:16:02 -0400 Message-ID: References: <87ikxlqwu6.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38795"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 04 15:17:15 2024 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 1sPMKo-0009q4-Qy for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jul 2024 15:17:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPMK0-0006mw-PA; Thu, 04 Jul 2024 09:16:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPMJv-0006mM-Gd for emacs-devel@gnu.org; Thu, 04 Jul 2024 09:16:19 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPMJj-0006gR-TX for emacs-devel@gnu.org; Thu, 04 Jul 2024 09:16:19 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 46404441989; Thu, 4 Jul 2024 09:16:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1720098964; bh=2AmpTGJ3TavqVLk1oPO9WLl3Z8fn9bBZJ205Oa8xJ3o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Pn2KmXszZpgVfEPCABGXIySrE6xDhptIJ8gXQn8WQh3qL7rCDNNuZ06+0tgK5tCKx NplRmscQYbmdhiB/I9mX3zZGUTdKCY1PhtZDYDRFFATZ21SNl4A8LHYlzrRBByBReB dRQqnpUJVnA8nyRGo8tP8J9JjLyg4E7YBKBS3B06JM43/rK3cHaXon8hLwBDwg6uqr 0bSFTvMNEsXmaLHXZmxfvj1zGy2E+wyobPj9ESOjVNfaiR9bV3CGqHYXgqx9xctvAQ X9YsBJUy+A02mlImeGWNDCn11/hgDM6h+295pulMhfbz+7h2RWBWjU7F2gHH/QAUe6 rmP6HqfjzVMqg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 947AE4419D0; Thu, 4 Jul 2024 09:16:04 -0400 (EDT) Original-Received: from pastel (unknown [45.72.245.253]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 45F1A120478; Thu, 4 Jul 2024 09:16:04 -0400 (EDT) In-Reply-To: <87ikxlqwu6.fsf@localhost> (Ihor Radchenko's message of "Thu, 04 Jul 2024 10:24:01 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321315 Archived-At: Ihor Radchenko [2024-07-04 10:24:01] wrote: > Stefan Monnier writes: >> There's no free lunch, so this comes at the cost of slowing down other >> marker operations, which is why I'd like to hear about your experience. >> ... >> So, for instance, `save-excursion` used to do a `copy-marker` followed >> by a (set-marker m nil), both of which were, typically, O(1) and are now >> made slower. > > First experience - severe performance degradation compared to master. > > Some perf stats: > > ;; Switch to todo and mark next 3 times, on branch > ;; 28.72% emacs emacs [.] markers_sanity_check Did you build with or without assertions? And indeed, I need to rework them to be "more conditional" (but I was focused on correctness until now). You should probably remove those calls to `markers_sanity_check` by hand when testing performance, sorry. Stefan