From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: The Emacs master is much slower than the emacs-27 branch. Date: Fri, 04 Dec 2020 09:59:24 +0000 Message-ID: References: Reply-To: Gregory Heytings Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16687"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.22 (NEB 394 2020-01-19) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 04 11:00:25 2020 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 1kl7t2-0004EQ-Qd for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 11:00:24 +0100 Original-Received: from localhost ([::1]:53526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kl7t1-00027s-TG for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 05:00:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kl7sL-0001el-Gz for emacs-devel@gnu.org; Fri, 04 Dec 2020 04:59:41 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:52728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kl7sJ-0002gU-HL for emacs-devel@gnu.org; Fri, 04 Dec 2020 04:59:41 -0500 Original-Received: from sdf.org (IDENT:ghe@faeroes.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 0B49xTA2002930 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 4 Dec 2020 09:59:29 GMT Original-Received: (from ghe@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 0B4A048r013297; Fri, 4 Dec 2020 10:00:04 GMT In-Reply-To: Received-SPF: pass client-ip=205.166.94.24; envelope-from=ghe@sdf.org; helo=mx.sdf.org 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, SPF_HELO_PASS=-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.23 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:260282 Archived-At: [Apparently this email, which I sent a few hours ago, did not reach the mailing list. I apologize if you receive it twice.] > > I've got pretty much up to date copies of both the master and the > emacs-27 branches. > > When I run my customary benchmark (see below) on master's src/xdisp.c in > master, it's taking around 34s. On emacs-27, it's taking 22s. > > That's a massive slowdown. Does anybody know why this is happening? > Should I raise a bug report? > > The benchmark I run is this: > > (defmacro time-it (&rest forms) > "Time the running of a sequence of forms using `float-time'. > Call like this: \"M-: (time-it (foo ...) (bar ...) ...)\"." > `(let ((start (float-time))) > ,@forms > (- (float-time) start))) > > (defun time-scroll (&optional arg) > (interactive "P") > (message "%s" > (time-it > (condition-case nil > (while t > (if arg (scroll-down) (scroll-up)) > (sit-for 0)) > (error nil))))) > > On a freshly loaded buffer, do M-: (time-scroll). > Did you use emacs -Q? What is your platform? Out of curiosity, I tried your benchmark on my computer (Debian GNU/Linux) for the following Emacs versions. I ran the benchmark four times for each version, and the results were stable for each version: Emacs 23.4.1: 5.2s (that's not a typo: five seconds) Emacs 24.5.1: 28.2s Emacs 25.2.2: 27.6s Emacs 26.3: 16.9s Emacs 27.1: 18.5s Emacs 28.0.50: 19.5s I see a slowdown between 27 and 28, but not a massive one. FWIW, here are the results of that benchmark after disabling global-font-lock-mode: Emacs 23.4.1: 1.1s Emacs 24.5.1: 1.8s Emacs 25.2.2: 1.8s Emacs 26.3: 3.0s Emacs 27.1: 3.3s Emacs 28.0.50: 3.3s