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: Markers in a gap array Date: Thu, 04 Jul 2024 10:24:01 +0000 Message-ID: <87ikxlqwu6.fsf@localhost> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37101"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 04 12:23:49 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 1sPJcw-0009Ky-4X for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jul 2024 12:23:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPJbu-0000UW-TI; Thu, 04 Jul 2024 06:22:43 -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 1sPJbr-0000UK-9I for emacs-devel@gnu.org; Thu, 04 Jul 2024 06:22:39 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sPJbi-0000GI-MS for emacs-devel@gnu.org; Thu, 04 Jul 2024 06:22:38 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 0FB54240027 for ; Thu, 4 Jul 2024 12:22:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1720088546; bh=zDCIx6jJNZZFEOJHrvjjrLTPZY2zHHkmzmxfZKsWC1o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=VRA2susQIM0t4Z8qavymebfosWOIrr8hixwt0E0RGum38KIxDwx/1JbokuG6RcEtt cmLBaiIsEA4zg+oNUvNGz2SMh2JzsTjc4Ti9JoI9nVvlaNIVibLgEyhjSkx4gGMSZS 9IO2xjvs5WYwZ3/JAC0GWG3XHk+YUYo/WWBpcXtnYqBtdgcgJYx13Gm5+FP+fuiyBt aZw6fCOAe/7bzqte61JKlLWZx9vf3oQzYrHq7XAJWxVIKmdcbQpBJ6q+nkEaWUb0ns mg2kDkIHm0oJaXQ59/WmEyDemQSbbm88R6maQcmOrysWetLvRDWH8ieieSGQHYPg3r 1yS5ahwv0oesg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WFCPs3Gdbz9rxN; Thu, 4 Jul 2024 12:22:25 +0200 (CEST) In-Reply-To: Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321310 Archived-At: 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 ;; 11.83% emacs emacs [.] Fmemq ;; 5.31% emacs emacs [.] process_mark_stack ;; 2.59% emacs emacs [.] re_match_2_internal ;; 2.47% emacs emacs [.] buf_bytepos_to_charpos ;; 1.60% emacs emacs [.] Ffuncall ;; 1.56% emacs emacs [.] vector_marked_p ;; master ;; 14.31% emacs emacs [.] Fmemq ;; 11.18% emacs emacs [.] re_match_2_internal ;; 3.97% emacs emacs [.] buf_bytepos_to_charpos ;; 2.60% emacs emacs [.] process_mark_stack ;; 2.00% emacs emacs [.] scan_sexps_forward ;; Just building agenda, on branch ;; 24.69% emacs emacs [.] markers_sanity_check ;; 11.32% emacs emacs [.] re_search_2 ;; 6.08% emacs emacs [.] re_match_2_internal ;; 4.57% emacs emacs [.] process_mark_stack ;; 3.61% emacs emacs [.] funcall_subr ;; 2.98% emacs emacs [.] Ffuncall ;; 2.79% emacs emacs [.] Fmemq ;; 2.73% emacs emacs [.] buf_bytepos_to_charpos ;; 2.38% emacs emacs [.] buf_charpos_to_bytepos ;; Just building agenda, master ;; 13.56% emacs emacs [.] re_match_2_internal ;; 12.02% emacs emacs [.] exec_byte_code ;; 7.92% emacs emacs [.] re_search_2 ;; 6.98% emacs emacs [.] Fmemq ;; 5.15% emacs emacs [.] process_mark_stack ;; 4.60% emacs emacs [.] funcall_subr ;; 2.58% emacs emacs [.] Ffuncall ;; 1.93% emacs emacs [.] funcall_general ;; 1.33% emacs org-element-ast-1c181933-d46555e0.eln [.] F6f72672d656c656d656e742d74797065_org_element_type_0 ;; 1.26% emacs emacs [.] plist_get ;; 1.22% emacs emacs [.] assq_no_quit ;; 1.22% emacs emacs [.] buf_bytepos_to_charpos ;; 1.02% emacs emacs [.] vector_marked_p ;; 0.95% emacs emacs [.] buf_charpos_to_bytepos -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at