From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: Improving EQ Date: Fri, 13 Dec 2024 12:24:37 +0000 Message-ID: <87o71fhiuk.fsf@protonmail.com> References: <87h679kftn.fsf@protonmail.com> <87ttb9xjvb.fsf@telefonica.net> <87pllxxi3d.fsf@telefonica.net> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26866"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?=C3=93scar_Fuentes?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 13 13:28:53 2024 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 1tM4mq-0006m2-Cm for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Dec 2024 13:28:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM4m8-0005en-LB; Fri, 13 Dec 2024 07:28:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tM4iv-0004fS-9e for emacs-devel@gnu.org; Fri, 13 Dec 2024 07:24:49 -0500 Original-Received: from mail-40133.protonmail.ch ([185.70.40.133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tM4ir-0004ez-2O for emacs-devel@gnu.org; Fri, 13 Dec 2024 07:24:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1734092681; x=1734351881; bh=2OyeH5WQzlQ9Fi5qLawvRET/F4zgY2pYWGLrr3kybD0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=aMyMre9gkJ1hh9yqG68o3CWKcHq0wUbTzuEW9MJylQSvUzNHrtoLZT9jCCndpTqqs R0ym0UZVjb0xJy4NhQheXbQBHX7RYZ86TXKcEQGdSSS0NR4LcTfuqmeH4oZsHAcB1h f7Rkr5oJE8uJVD262hGxHIzWKgYeSKx1KwyFA+BI6jJuNdBV952WBZGfnew/w08fkF YpRfZhYIutGgWSQwDagy23VdCdZ0+E5ZI7n+BGbsDYnpqe8yLNF2GycG52tg/baHWE gg3I2U7jH3Kfd/YLk8VeeRsXRJ1cPIXzSg3bAs6xMj4Lw7atQub7EKDOgucDHKX9AP +G0Nk72uTD0Fg== In-Reply-To: <87pllxxi3d.fsf@telefonica.net> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 86489767d580403271d9ecd40ea9f2240c22ed0b Received-SPF: pass client-ip=185.70.40.133; envelope-from=pipcet@protonmail.com; helo=mail-40133.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 13 Dec 2024 07:27:57 -0500 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326452 Archived-At: =C3=93scar Fuentes writes: > Andrea Corallo writes: > >>> But reading your message makes me wonder if EQ and some other "simple" >>> fundamental functions are not lowered by nativecomp? If not, maybe >>> that's a significant opportunity for improvement. >> >> Nativecomp only compiles eq for Lisp code, the one discussed here is the >> eq used in C (and bytecode). Does nativecomp actually call emit_EQ for anything but lowering ELC jump tables into a sequence of conditional branches? I don't see any code to do so, and Emacs builds fine without emit_EQ if byte-compile-cond-use-jump-table is disabled. > Of course this change also affects Emacs running with nativecomp, as > many calls to EQ are made by C functions not lowered by nativecomp. My impression is that nativecomp usually ends up calling Feq for eq-based conditions. My point is that emit_EQ is used very rarely, when emitting a switch statement (and switch statements should usually use maybe_remove_pos_from_symbol + BASE_EQ rather than EQ). So I won't bother doing anything with emit_EQ. Pip