From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: The Emacs master is much slower than the emacs-27 branch. Date: Fri, 04 Dec 2020 20:34:54 +0100 Message-ID: <87tut1s6u9.fsf@gmx.net> References: <877dpyzg9d.fsf@rub.de> <87czzpsyqn.fsf@gmx.net> <83o8j9eqwx.fsf@gnu.org> <874kl1spe9.fsf@gmx.net> <83blf9em55.fsf@gnu.org> <87zh2tr82r.fsf@gmx.net> <87v9dhr7i5.fsf@gmx.net> <838sadefiw.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="35334"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: acm@muc.de, Eli Zaretskii , emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 04 22:03:46 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 1klIF0-00096f-5N for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 22:03:46 +0100 Original-Received: from localhost ([::1]:59338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klIEz-0002rY-6G for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 16:03:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klGrN-0003GK-3V for emacs-devel@gnu.org; Fri, 04 Dec 2020 14:35:17 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:35169) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klGrE-0000d3-C3; Fri, 04 Dec 2020 14:35:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607110503; bh=L0+kTKCuvdTdZPUj14IsHd8Mntdeo3DAS8RKp2K5/bY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=HFqq2rJ8AE3HaAacKLg6ZH+HCxWqD8ct81SnW6NA8CCFi+GTtmLI92xhBoe5dFgLp Fl7bBqLFSVd9WIFJfZIxHvywjCtMEH4ocztQ8J15ezEDP5UG5KTWqk7Q4wsB1GtdEn WHCsoDQwb32tTd9LsiDVmXjqOFdWYRCUK7OdO+vw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-jhalfs ([178.6.218.210]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mo6ux-1kMhTQ1T5P-00pZ4a; Fri, 04 Dec 2020 20:35:03 +0100 In-Reply-To: (Gregory Heytings's message of "Fri, 04 Dec 2020 19:27:37 +0000") X-Provags-ID: V03:K1:EnITxZ3oI6fVzEQBH3Gt9vQIwPREYorKOKxRVG0BxSG2I2+wXr3 4snH8m+aUCMO8RSNPn9cBnFNHdcIwuKw4XocBEubByoxo7aKgaxp9ZbZD77fYOuL3eKc+SM b16eeja416JniA6lwewI0TFk5zAoPVEf8Os97Xr0c/YEBoCMzJsQzrwxfGm2xoKxUAgccIr uudXg/pm2pHic3B1EaOUw== X-UI-Out-Filterresults: notjunk:1;V03:K0:6VvuIodMfsc=:g4PrGOHPKikAXstT7Fd26S TaSSdjV+8vRQDmzW81DdpJs6eFYtbgLyWgPIAraSd1y23DI8+tfhzpsKjNnndQtJizJ6VyEoy vJnFu99FagDVM3uZzRoyw/D31iXLlaRageNWQeRChJOKkX3b2pYc+bTtmNgU4PdfmnwKhM7Z9 rE1BVBKHwg4n3COKiQ6Sb9IPDWoRfyL3Pbtyox638cqLHIZ9rSED2BiwiltzGimGHLlbIMacV xR61iM5uEZT1JFeWCQdbtfHVIws9OQABN0T+VpycllrFYO62e/t6xHYLRFXwo0QVqegVeWfxG cSnebsed7jaMnwAtQsMkBRpLybk7lr89LzryFUY1REcbAMVxY1Xv73yZo38V+BXlKEHsvxoFn wl/WdGl6pJ0dq6gQqz2/C+zflfuerWDnd5PlLcy39X8k4DLOQB2z1S9A7nBbW2diRROt/gM8Z xDDoAWWzOHKRt9SeLKKoxAvzOthhhWrg57jWdMunh8+FDyLpeYgn/pR4jWQyRDVfqoPqs1i7e eIUbcrtIhB82Jz5fAzp13pINjQnJs9BxgEOxjcJFPFsjcMaoMfbp0Mfx+Bzf8Mw4GezDibes5 O95Np8IDhhh27glDXu8sHNK0pjOlcXNDQzxa+q6WarVdETYFF7qnFoUwtR/kCy0tCZ8hfjy+p zo1+qhMD6WA4OhXoLpfq+0PCIqpw33agZhjP+GrovNk5/JOchrqakpt6GXWfqzM69uAXSBq8E 3P1awuDf33s9VUXjfB6gABsnhkQkjjqXqBbLin8YiKTSQTnje6vRfSj0D6UAVwgAdsLQyLCU Received-SPF: pass client-ip=212.227.17.21; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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.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:260318 Archived-At: On Fri, 04 Dec 2020 19:27:37 +0000 Gregory Heytings wrote: >>>> I just rebuilt emacs-27 with "make bootstrap", reran the benchmark, and it >>>> took ~60 seconds, about a second faster than the previous non-bootstrapped >>>> build. The profile is similar to the previous one from emacs-27, but I've >>>> attached for your perusal anyway. I'll bootstrap master too and run the >>>> benchmark there again. >>> >>> On freshly bootstrapped master the benchmark took the same time as before, >>> ~21 seconds, and the profile looks pretty much the same, so I haven't >>> attached it, but will send it if you want to see it. >> >> Thanks. This is very strange. What are the build options and the features >> in each build? are they identical? >> > > Indeed with CFLAGS='-Og -g3', on my computer (Debian GNU/Linux, GCC 10.2.0) > with 28.0.50 this benchmark takes 25.2 seconds, whereas with 27.1.50 it takes > 67.6 seconds. > > I bisected this, and the origin of the regression is commit > 365dad197bac5deec9244fd9c189d23c46c99b31, which changes the default to "use > 'static' instead of 'extern inline' [in C headers] because 'static' typically > has better performance for Emacs". With -Og or -O0, the benchmark takes 67 > seconds, with -O1 or above (-O2 is the default) it takes 25 seconds. > > Emacs 28.0.50 uses 'static inline' instead of 'extern inline' again, "because > 'static inline' has much better performance for Emacs when compiled with 'gcc > -Og'" (see src/conf_post.h). Thanks for tracking that down! Steve Berman