From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44471: [PATCH] Simplify text-quoting-style Date: Wed, 11 Nov 2020 21:24:46 +0200 Message-ID: <83y2j7zog1.fsf@gnu.org> References: <87zh3qjzh3.fsf@gnus.org> <831rh12ntc.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29574"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 44471@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 11 20:28:15 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kcvmw-0007a1-KC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Nov 2020 20:28:14 +0100 Original-Received: from localhost ([::1]:33906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcvmu-0004IU-91 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Nov 2020 14:28:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcvjr-00029i-Jc for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 14:25:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcvjq-0007Rl-MC for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 14:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kcvjq-0006r8-I9 for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2020 14:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Nov 2020 19:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44471 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch Original-Received: via spool by 44471-submit@debbugs.gnu.org id=B44471.160512268326280 (code B ref 44471); Wed, 11 Nov 2020 19:25:02 +0000 Original-Received: (at 44471) by debbugs.gnu.org; 11 Nov 2020 19:24:43 +0000 Original-Received: from localhost ([127.0.0.1]:42872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcvjW-0006po-T7 for submit@debbugs.gnu.org; Wed, 11 Nov 2020 14:24:43 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcvjU-0006pS-Rn for 44471@debbugs.gnu.org; Wed, 11 Nov 2020 14:24:41 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35411) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcvjP-0007Gr-BA; Wed, 11 Nov 2020 14:24:35 -0500 Original-Received: from [176.228.60.248] (port=4246 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kcvjO-0006YF-HQ; Wed, 11 Nov 2020 14:24:34 -0500 In-Reply-To: (message from Stefan Kangas on Wed, 11 Nov 2020 14:12:24 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193129 Archived-At: > From: Stefan Kangas > Date: Wed, 11 Nov 2020 14:12:24 -0500 > Cc: larsi@gnus.org, 44471@debbugs.gnu.org > > > . it slows down code of two very popular functions, because we now > > use EQ instead of a C-level equality operator; > > If I understand correctly, EQ(x, y) ends up in a C-level equality > operator and a typecast. Is that correct? No. EQ either expands to a call to lisp_h_EQ, or calls lisp_h_EQ, which does: #define lisp_h_EQ(x, y) (XLI (x) == XLI (y)) Depending on how Lisp_Object is represented, this could be a typecast or an access to a struct member. > If yes, is it the typecast > that you think will cause a slowdown, or is it something else? the function call and the struct access. > I naively thought that this would not make much of a difference, and > that, to the extent that it did, the relevant functions are hardly > called often enough to matter in the end. The difference is very minor, but the point is that it's a (minor) disadvantage. > > . it introduces a function that has the same name as a variable, > > which adds a bit to confusion, and also defeats our method of > > reporting in what version was the function/variable introduced > > (try "C-h f"); and > > This is not without precedent, see e.g. `user-full-name'. But if we > want to keep my patch we could of course just use the previous name > `get-text-style' instead. > > > . I don't think I see the simplification that justifies these > > (admittedly quite minor) downsides > > I agree it is minor, but I see one function less, one less enum, and > overall fewer lines of code. > > I'm happy to revert it if the change is not wanted. I don't have strong opinions, so I will leave it to you and others. My point, though, is that minor cleanups should preferably not have adverse effects, otherwise their benefit is questionable.