From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Time to merge scratch/correct-warning-pos into master, perhaps? Date: Sun, 16 Jan 2022 15:26:44 +0000 Message-ID: References: <83mtjwzwkb.fsf@gnu.org> <87r198ytog.fsf@gnus.org> <87lezfzy5h.fsf@gnus.org> <83sftnyilw.fsf@gnu.org> <83mtjvyd4t.fsf@gnu.org> <83k0ezyb68.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7088"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 16 16:27:49 2022 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 1n97Rd-0001gm-GE for ged-emacs-devel@m.gmane-mx.org; Sun, 16 Jan 2022 16:27:49 +0100 Original-Received: from localhost ([::1]:33752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n97Rc-0001pB-Ft for ged-emacs-devel@m.gmane-mx.org; Sun, 16 Jan 2022 10:27:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n97Ql-00018J-Nt for emacs-devel@gnu.org; Sun, 16 Jan 2022 10:26:56 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:59555 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1n97Qg-0001ty-RC for emacs-devel@gnu.org; Sun, 16 Jan 2022 10:26:53 -0500 Original-Received: (qmail 80193 invoked by uid 3782); 16 Jan 2022 15:26:48 -0000 Original-Received: from acm.muc.de (p2e5d50dc.dip0.t-ipconnect.de [46.93.80.220]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 16 Jan 2022 16:26:48 +0100 Original-Received: (qmail 32430 invoked by uid 1000); 16 Jan 2022 15:26:44 -0000 Content-Disposition: inline In-Reply-To: <83k0ezyb68.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de 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_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" Xref: news.gmane.io gmane.emacs.devel:284828 Archived-At: Hello, Eli. On Sun, Jan 16, 2022 at 17:04:15 +0200, Eli Zaretskii wrote: > > Date: Sun, 16 Jan 2022 14:45:28 +0000 > > Cc: larsi@gnus.org, emacs-devel@gnu.org > > From: Alan Mackenzie > > > Are you saying that the measured slowdown is specific to the > > > byte-compiler, and will not affect other uses of Lisp, or affect them > > > much less heavily? > > Yes. The byte compile, as expected, is more slowed down than other > > software. On a quick measurement of compiling comp.el, I found a > > slowdown of around 12% > That seems to be inconsistent with the 17% slowdown compiling the *.el > files that Lars measured. Or measurement error. The coding style is likely to be quite a bit different between gnus and comp.el. > > > Because the byte-compiler is just another Lisp program, it doesn't in > > > general do anything an arbitrary Lisp program won't do. > > It does. It runs with symbols with position activated, so any operation > > involving an EQ which doesn't match is going to be significantly slower. > But EQ is not specific to the byte-compiler, is it? > > > Can you show a profile where this could be seen quantitatively? > > I'm not sure I understand. The slowdown in the byte compiler is > > distributed throughout the Emacs C Code. It doesn't happen at any > > particular isolated place. > I thought the slowdown was in Lisp somewhere. If it's in EQ, I'm not > sure I understand how come the byte-compiler's slowdown is so much > more significant than in other Lisp code. The specification of the macro lisp_h_EQ in lisp.h L370 starts off: #define lisp_h_EQ(x, y) ((XLI ((x)) == XLI ((y))) \ || (symbols_with_pos_enabled \ ..... If symbols_with_pos_enabled is currently false, EQ need never execute more than these first two lines. If the variable is true, potentially each of the other three cases (each variable x and y can be with or without a position, giving four matching possibilities) needs to be checked individually, which is slow. Essentially the same code is coded up as emit_EQ inside comp.c. -- Alan Mackenzie (Nuremberg, Germany).