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: master 5f8922b9e2: ; * lisp/emacs-lisp/cconv.el (cconv--var-classification): Optimise. Date: Sat, 09 Jul 2022 11:38:05 -0400 Message-ID: References: <165736046128.27360.2696493706334277108@vcs2.savannah.gnu.org> <20220709095421.898F1C0F1E3@vcs2.savannah.gnu.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="21364"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Mattias =?windows-1252?Q?Engdeg=E5rd?= To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 09 17:39:00 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 1oACXs-0005ML-IQ for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jul 2022 17:39:00 +0200 Original-Received: from localhost ([::1]:48294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oACXq-0007NW-TB for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jul 2022 11:38:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oACX6-0006C2-3p for emacs-devel@gnu.org; Sat, 09 Jul 2022 11:38:12 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:35571) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oACX3-0002yJ-Q8 for emacs-devel@gnu.org; Sat, 09 Jul 2022 11:38:10 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B2E1D8076B; Sat, 9 Jul 2022 11:38:08 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7E0A780640; Sat, 9 Jul 2022 11:38:07 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1657381087; bh=EVbYhPOIu2MCG50YIZgb/+B1x9xYWhEpKiYtPS3cItg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hUfd61w+VOuLtQkJ0hSv0QfqZB4bJHLEz9N2JCwtO10Nui9xIibFGjHV2mAQACcfT BJiX4J+OBai1kwCkx00Kd6/j2Z0CvMhfDQaJomVUZbEKQc25Dv11VIw6BZRlgq5aW/ 2V6m6r4GXExXvgAfL4xpwwJBrbXAcsABfUhFrV3aKKlO2yH95T9060+425r5s78vY3 tqW4nR1ck5njvpaur0O6RI0oheRnLZv5dSazpBGr5RlBSVGfDXuQ7mVm/zxI06bOG0 E80kY4KtRQ6Pj25bf1kCacm8RBE79YeblDlNdN2SCfPaPO0uAZg7jI75Nrz3ENBCgs T/KT7aGtHrKLA== Original-Received: from pastel (unknown [45.72.196.165]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 41495120153; Sat, 9 Jul 2022 11:38:07 -0400 (EDT) In-Reply-To: <20220709095421.898F1C0F1E3@vcs2.savannah.gnu.org> ("Mattias =?windows-1252?Q?Engdeg=E5rd=22's?= message of "Sat, 9 Jul 2022 05:54:21 -0400 (EDT)") 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:291991 Archived-At: Mattias Engdeg=E5rd [2022-07-09 05:54:21] wrote: > ; * lisp/emacs-lisp/cconv.el (cconv--var-classification): Optimise. > --- > lisp/emacs-lisp/cconv.el | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el > index eca1123899..7f95fa94fa 100644 > --- a/lisp/emacs-lisp/cconv.el > +++ b/lisp/emacs-lisp/cconv.el > @@ -267,8 +267,7 @@ Returns a form where all lambdas don't have any free = variables." >=20=20 > (define-inline cconv--var-classification (binder form) > (inline-quote > - (alist-get (cons ,binder ,form) cconv-var-classification > - nil nil #'equal))) > + (cdr (assoc (cons ,binder ,form) cconv-var-classification)))) I think a better optimization for that is to write a compiler-macro, no? Stefan