From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Findirect_function Date: Fri, 14 Jan 2022 17:48:31 +0100 Message-ID: <87r19a9sbk.fsf@elite.giraud> References: <87tue61tz1.fsf@elite.giraud> 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="19131"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 14 17:51:06 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 1n8Pn6-0004o6-3e for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 17:51:04 +0100 Original-Received: from localhost ([::1]:41050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8Pn4-0004sZ-Jl for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jan 2022 11:51:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8Pky-0003o3-A2 for emacs-devel@gnu.org; Fri, 14 Jan 2022 11:48:52 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:22720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8Pkw-0004oG-4p for emacs-devel@gnu.org; Fri, 14 Jan 2022 11:48:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=f48JR97l+9+WhmQL dFfWU3c4NCUIaU9HhHV4FnQX7eo=; h=in-reply-to:date:references:subject: cc:to:from; d=ledu-giraud.fr; b=OfEC54TZVh66J79a6cZ4FAQet8bOhJzNZcr86i zUEAIGvzqt1zhsBx2sDLm++iYGmVUhmX0/8bRn9npQSruVhwuh6TqLXZc7+PcW3VSh1TzX qMD+ohaYQ+bSicZAxUHrjPbl+pAON/BNqLzw0pceUjR2xe7rLpcol0VnoXxkoRwIWB/Vbj JHev8g5L5ZpVoHZ+VGYb21002wMsw5y8flh/xy78StsfWZY7MNQoAKE+PDna12NcEY2vUl 2YzViGvwtxjR7XnPOrZ8kjgYtsxiBjHe4Wrc2NjyYc9Sp323L+tVR0Zky9/fMW1CQSzOko c8ZiG8Ck6hs5jXyO9sXtrc1w== Original-Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 7ee9e144 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 14 Jan 2022 17:48:45 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Fri, 14 Jan 2022 11:27:30 -0500") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr 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, SPF_HELO_PASS=-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:284756 Archived-At: Stefan Monnier writes: >> /* Optimize for no indirection. */ >> - if (SYMBOLP (fun) && !NILP (fun) >> - && (fun =3D XSYMBOL (fun)->u.s.function, SYMBOLP (fun))) >> - { >> - fun =3D indirect_function (fun); >> - if (NILP (fun)) >> - /* Let funcall get the error. */ >> - fun =3D args[0]; >> - } >> + fun =3D Findirect_function(fun, Qt); >> + if (NILP (fun)) >> + /* Let funcall get the error. */ >> + fun =3D args[0]; > > This should remove the corresponding comment. You mean the /* Optimize=E2=80=A6 */ comment, right? > And I think I'd only be willing to make such a change if it comes with > some benchmarking showing that this optimization does not actually make > a difference. Do you happen to have some hints on how to do benchmarking in emacs? =F0=9F= =98=85 --=20 Manuel Giraud