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: Tue, 25 Jan 2022 18:27:54 +0000 Message-ID: References: <83r18zkmd5.fsf@gnu.org> <835yq9ls7j.fsf@gnu.org> <058b682b11240176288f@heytings.org> <83h79tjd2f.fsf@gnu.org> <058b682b11f58780b580@heytings.org> <83v8y8ij39.fsf@gnu.org> <6a5bb5a08b3d764611f9@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23606"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, mattiase@acm.org, Gregory Heytings , Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 25 19:29:56 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 1nCQZo-0005y1-Lw for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 19:29:56 +0100 Original-Received: from localhost ([::1]:47012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCQZn-000799-Cj for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 13:29:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCQXv-0006LX-8x for emacs-devel@gnu.org; Tue, 25 Jan 2022 13:27:59 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:23442 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1nCQXt-0008St-7Q for emacs-devel@gnu.org; Tue, 25 Jan 2022 13:27:58 -0500 Original-Received: (qmail 90104 invoked by uid 3782); 25 Jan 2022 18:27:55 -0000 Original-Received: from acm.muc.de (p4fe1523e.dip0.t-ipconnect.de [79.225.82.62]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 25 Jan 2022 19:27:54 +0100 Original-Received: (qmail 4788 invoked by uid 1000); 25 Jan 2022 18:27:54 -0000 Content-Disposition: inline In-Reply-To: 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:285377 Archived-At: Hello, Stefan. On Tue, Jan 25, 2022 at 08:27:55 -0500, Stefan Monnier wrote: > > The C level EQ operation takes twice as long when the operands do not > > match, and the same time as before when they do match. > I highly doubt reality is that simple because CPU performance is a lot > more complex than just counting instructions. OK, but as a first estimate, it should do as an explanation. > > When one of the operands is a literal nil, there is no increase in > > execution time. > That's an oversimplification as well: it's only when we use the `NILP` > macro that the extra cost is avoided. Any use of `EQ` is still slowed > down when it happens to receive a nil as one of the arguments. I think, but I'm not quite sure, that a literal nil gets handled by BASE_EQ rather than EQ, or this might depend on it getting native compiled. > I do find the slowdowns discussed here rather worrisome. > I thought the original agreement was that it was OK to install this > change if the slowdown could be brought down to about 1% or below (for > the non-compilation case). > More importantly, I wonder how slowing down EQ by a factor of 2 can end > up costing 10% of runtime when running the test suite. I think this > deserves investigation. Maybe it's because a lot of the time spent by make check is spent in compilation, whether byte or native. Compilation _is_ slower, by quite a bit. When I ran elisp-benchmark on the before and after versions, the change was 2½% (on a native compiled Emacs). > Stefan -- Alan Mackenzie (Nuremberg, Germany).