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.bugs Subject: bug#65491: [PATCH] Improve performance allocating vectors Date: Sat, 26 Aug 2023 08:07:29 +0000 Message-ID: <871qfquszi.fsf@localhost> References: <87y1i0iwvu.fsf@localhost> <83bkeumg17.fsf@gnu.org> <87ttsm9sbk.fsf@localhost> <837cpimf87.fsf@gnu.org> <87o7iu9r6x.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="2831"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65491@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 26 10:08:08 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qZoL1-0000V0-RJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Aug 2023 10:08:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZoKs-0008At-78; Sat, 26 Aug 2023 04:07:58 -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 1qZoKq-00084Q-VU for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 04:07:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZoKq-0005ok-NR for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 04:07:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZoKv-0004Cy-O5 for bug-gnu-emacs@gnu.org; Sat, 26 Aug 2023 04:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Aug 2023 08:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65491 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65491-submit@debbugs.gnu.org id=B65491.169303723316111 (code B ref 65491); Sat, 26 Aug 2023 08:08:01 +0000 Original-Received: (at 65491) by debbugs.gnu.org; 26 Aug 2023 08:07:13 +0000 Original-Received: from localhost ([127.0.0.1]:41701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZoK9-0004Bn-31 for submit@debbugs.gnu.org; Sat, 26 Aug 2023 04:07:13 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:58271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZoK6-0004BX-Uk for 65491@debbugs.gnu.org; Sat, 26 Aug 2023 04:07:12 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3F02524002B for <65491@debbugs.gnu.org>; Sat, 26 Aug 2023 10:07:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693037220; bh=kWpydbsLfe1lf0vlHuCZfzhZIHiHGhDfqakuhHZuyqM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=T5TAYwQ9BZg19CoJsmPW6TRBlchi5cQKo06yXPvX981jlFBnLNSmOxdlPoEqBfzwx BDt8mgntql9s8JnssT5IsKzVV3jPmj0U9wFyuFUStUhM0rd5z+DRc8piC7pXiYK5SC jvHC5vpTB2GcA32wK4YPGiKn9eLul3zzys+HfueGdN8CtQTB8J8pxQoQ6z9ZfzpIhz 78KFisx+wAiU81B0dC5rlb0HtZvx6aS/6sBg+s3bLyGHtEOjGS3m9Ku8h7iBGXYfGC kVCuC1MF6ofAZ3bHRlEl+K3Bx6cfvt/BVsTXTlEeeXL5i+ZW4j7a5inlyxG+OARJHk C/SH4BbXfNYcA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RXqD31YZ9z9rxF; Sat, 26 Aug 2023 10:06:59 +0200 (CEST) In-Reply-To: <87o7iu9r6x.fsf@localhost> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268487 Archived-At: Ihor Radchenko writes: > Do you mean something like scrolling performance when scrolling a large > Arabic/Korean text file? I downloaded Quran from https://tanzil.net/download/, opened it Emacs like $ perf record ./src/emacs -Q ~/Downloads/quran-simple-plain.txt and scrolled the buffer with PgDown all the way to the bottom. It does not look like allocation vectors is all that heavy here (compared to the edge case with fib.el with bignums). without the patch: 10.14% emacs emacs [.] process_mark_stack 3.79% emacs emacs [.] sub_char_table_ref 3.68% emacs emacs [.] x_draw_glyph_string 2.75% emacs libc.so.6 [.] pthread_mutex_lock 1.75% emacs libc.so.6 [.] 0x0000000000088b0a -> 1.41% emacs emacs [.] allocate_vectorlike 1.30% emacs emacs [.] sweep_vectors 1.27% emacs emacs [.] char_table_ref with the patch 9.97% emacs emacs [.] process_mark_stack 4.30% emacs emacs [.] x_draw_glyph_string 3.58% emacs emacs [.] sub_char_table_ref 2.66% emacs libc.so.6 [.] pthread_mutex_lock 1.87% emacs libc.so.6 [.] 0x0000000000088b0a 1.29% emacs emacs [.] sweep_vectors 1.22% emacs emacs [.] face_for_font 1.17% emacs emacs [.] char_table_ref ... -> 0.26% emacs emacs [.] allocate_vectorlike 1.41% down to 0.26% ~5x speedup. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at