From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Time to merge scratch/correct-warning-pos into master, perhaps? Date: Tue, 25 Jan 2022 14:26:31 -0500 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: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21565"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Gregory Heytings , mattiase@acm.org, Eli Zaretskii , larsi@gnus.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 25 20:54:25 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 1nCRtY-0005Pt-Be for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 20:54:24 +0100 Original-Received: from localhost ([::1]:47954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCRtX-00082e-0c for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Jan 2022 14:54:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCRSh-0005x9-Dm for emacs-devel@gnu.org; Tue, 25 Jan 2022 14:26:40 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:20710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCRSe-0000wf-So; Tue, 25 Jan 2022 14:26:38 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 46606805F9; Tue, 25 Jan 2022 14:26:34 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A3B86804FC; Tue, 25 Jan 2022 14:26:32 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1643138792; bh=+IeEUMAVeRzFV63kZBX/6sXdiJ0FLhJcIvClyeBY2V0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=dn7W2RtEL7nutbvXIIpjB9ziLTSDMf3j1TnEhMHWpBzTXIcKoSqTTeFXrRorocN2G RRVOF0sIBH2TNVRHdQIxYxAvEqQqJuG9h5gBBGASmJZ7LMXSyzS96CboFJtYtxkx1+ 7fbY1g6QiBV+TQJkWn5XBVe3LImK0NPqYN0tErG2OmVOqnz1cgfouOKBfDM2K1d8Xt 9kbrytH38sTUTn8X9UVF/rYYgEngls7l6DzpOBJzMQE+/NkCmaMLZxNUq9rXp53FCQ VypXXJH4BMHZO7lbSD9mUbDl0PHW+BfAYtJTIU40l7Mybzbv4qdtQ4pnw+144Axdv2 qx9yT3pZ0pRUw== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 62F531203B5; Tue, 25 Jan 2022 14:26:32 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Tue, 25 Jan 2022 18:27:54 +0000") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:285385 Archived-At: >> 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 don't think that's the case of C code that says EQ (Qnil, ...) maybe it is the case for ELisp code that says (eq nil ...) and which gets native compiled. But I suspect it's a very small proportion of the uses of EQ/eq, in any case. Of course there shouldn't be very little code that says `EQ (Qnil, ...)` because such code should use `NILP` instead (and *that* code indeed doesn't suffer from the slowdown). >> 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. No, we are talking about the execution time: Gregory Heytings wrote: In short: byte-compilation is ~17.5% slower, execution is ~11% slower. Nowhere near the "in the region of 1%" that was announced. > When I ran elisp-benchmark on the before and after versions, the change > was 2=BD% (on a native compiled Emacs). So, something changes the cost from 2-3% to 11%. Maybe it's native compilation (tho I don't know if Gregory ran these with native compilation or not), or maybe it's somewhere in the nature of the code in the test suite, or ... Mind you, I consider 2=BD% to be already quite different from "about 1%", but I think we should first focus on those 11% reports because I don't think I'm willing to slow down all execution by 10% just to get better position info in the compilation warnings. Stefan