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.devel Subject: Re: Lift {global,local}-key-binding to Lisp Date: Thu, 14 Jan 2021 22:24:23 +0200 Message-ID: <83im7zb72g.fsf@gnu.org> References: <83zh1cbpua.fsf@gnu.org> <83lfcvb7pj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7642"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: stefan@marxist.se Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 14 21:26:21 2021 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 1l09CH-0001uY-F6 for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Jan 2021 21:26:21 +0100 Original-Received: from localhost ([::1]:52532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l09CG-0006TI-GL for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Jan 2021 15:26:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l09AT-0005OS-CN for emacs-devel@gnu.org; Thu, 14 Jan 2021 15:24:29 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58858) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l09AS-0006lC-M4; Thu, 14 Jan 2021 15:24:28 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1605 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l09AS-00048y-1S; Thu, 14 Jan 2021 15:24:28 -0500 In-Reply-To: <83lfcvb7pj.fsf@gnu.org> (message from Eli Zaretskii on Thu, 14 Jan 2021 22:10:32 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:263054 Archived-At: > Date: Thu, 14 Jan 2021 22:10:32 +0200 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org > > > From: Stefan Kangas > > Date: Thu, 14 Jan 2021 13:24:10 -0600 > > Cc: emacs-devel@gnu.org > > > > AFAIK, the main reason to have things in C is if there is a performance > > benefit to doing so. > > That's not the only reason Btw, calling lookup-key from Lisp does add a level of indirection (and thus slowdown) compared calling Flookup_key from C, because of how the Lisp interpreter calls primitives. So even for such simple rewrite in Lisp there are disadvantages, albeit minor ones.