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: Fri, 04 Feb 2022 17:30:09 -0500 Message-ID: References: <6a5bb5a08b6337d733c5@heytings.org> <83leyq3kfk.fsf@gnu.org> <83a6f631k3.fsf@gnu.org> <838ruq2z5t.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="18319"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Eli Zaretskii , gregory@heytings.org, mattiase@acm.org, 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 Fri Feb 04 23:32:05 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 1nG77d-0004Yr-81 for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Feb 2022 23:32:05 +0100 Original-Received: from localhost ([::1]:38170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nG77b-0003Cj-Io for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Feb 2022 17:32:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nG764-0002Cp-OJ for emacs-devel@gnu.org; Fri, 04 Feb 2022 17:31:01 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nG760-0007W4-JP; Fri, 04 Feb 2022 17:30:27 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2853B805EF; Fri, 4 Feb 2022 17:30:13 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 772A480306; Fri, 4 Feb 2022 17:30:11 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1644013811; bh=aekx6gLgxctR8IQsniHDSYMxSEd+Il7p2mw5eOz7sbM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Yo+RXJdyj7o4ig7AL/piIglFkHoSM9HbF1bjNGlckx+Wv2VDDi26zNivs2aRqIj15 XIjHq9gS16kM5XI9CBzvQVWG1jmNuCnm/gdEyV4PMjtI78f21z0RZFaCzBps2eIywa pxcz7QM0fCebU075Wv0VHhDKEqHrXvrbdvlnFTfpY5w6LDQFfju8Uj8u0D5qh3z2NT PK+Bt9KI3qlPaPtqmM+SwW9QKFI0ojt9Y2/BisofIwv+bqqoHl5/BriVTJDuH1n8Bs 5yGuTu6b/HNf7zduQ2PANBPQ661xc5Y4eu6N8kLxkjxr62nkoHbDt+HWH8h1cE7NAe H2IQExcT+v0sg== Original-Received: from pastel (76-10-138-212.dsl.teksavvy.com [76.10.138.212]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 31652120442; Fri, 4 Feb 2022 17:30:11 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Fri, 04 Feb 2022 17:24:09 -0500") 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, T_SCC_BODY_TEXT_LINE=-0.01 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:285878 Archived-At: > I think he meant "general purpose". So the answer is no, > symbol-with-pos should not occur in general purpose code. And indeed > that's why you have that boolean var controlling `EQ` to choose between > the slow version (used in the compiler) and the fast version (used > everywhere else). The fast version is exactly the same as the > previous `eq` but it still makes the new `EQ` slower because of the > extra choice between the slow version and the fast one. BTW, currently, it's not just `EQ` that's slower but also `XSYMBOL` and `SYMBOLP`. I think we could make those faster (especially we could probably make `SYMBOLP` as fast as it was), but I don't know if those have a noticeable performance impact. > I can't see why we couldn't but I can't see why it would help either. > We'd still have the problem that two different objects may need to be > considered `eq`, so we need `eq` to be slower. One way out of this is to go through all the compiler code and all the macros and arrange for it to avoid using `eq` (and use `equal` instead) when comparing symbols. Then we could revert `EQ` to be the fast equality check that it was. It's no small task, tho, Stefan