From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: On elisp running native Date: Mon, 09 Mar 2020 17:06:39 -0400 Message-ID: References: <87eeu5txxw.wl-all_but_last@163.com> <8736ah4dlm.wl-all_but_last@163.com> <87zhcp2ve4.wl-all_but_last@163.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="68407"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Andrea Corallo To: Zhu Zihao Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 09 22:07:29 2020 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 1jBPcV-000HiE-PQ for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Mar 2020 22:07:27 +0100 Original-Received: from localhost ([::1]:49802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBPcU-00075J-PG for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Mar 2020 17:07:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39601) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBPbs-0006Nq-Pa for emacs-devel@gnu.org; Mon, 09 Mar 2020 17:06:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBPbr-0001tm-JB for emacs-devel@gnu.org; Mon, 09 Mar 2020 17:06:48 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:59065) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBPbr-0001sX-FW for emacs-devel@gnu.org; Mon, 09 Mar 2020 17:06:47 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7B2D944F1C5; Mon, 9 Mar 2020 17:06:42 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B66B244F1C2; Mon, 9 Mar 2020 17:06:40 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1583788000; bh=d8ak9Xjlfg28IqB8IrpUR4Id6M/RX/L4Fbv90+QdUHY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jV/MU88ldW09nuXPYUz/MFuXIkmnZHvrAjOAQaA2PzUweigsjJsEcWxmden8G6oJk bPAoxJbqpkpGtUd8RBPezicMs3pIk72d5uOf3SRYseucZrLutjth3hYhrlY3nqghaB yR5V6Fc7kwAepUbB46SUHyvFPLMrxwub2H9BmiUiBMJQPYgp2qTK47uZrbqmXRyxqE 66hoNwlrqD8TY1xCEZBx5bGRaMmr33jubtc5Sx27HDkL4ITEcpU0p5yU/PtcQ+ghF5 9kl8Ekzxs37g6VQc/ZqBPzLSqRpu31qiPFIzTuJC0T/hlfPusL7RPwB9Gfvbf/nils P32cozCXVBr2g== Original-Received: from alfajor (unknown [216.154.50.221]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7576212064D; Mon, 9 Mar 2020 17:06:40 -0400 (EDT) In-Reply-To: <87zhcp2ve4.wl-all_but_last@163.com> (Zhu Zihao's message of "Tue, 10 Mar 2020 03:14:27 +0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:245413 Archived-At: > Another question is, polymorphic functions defined by `cl-defmethod` can't be > native compiled. `cl-defmethod` generates and byte-compile dynamic lambda to > support runtime multi-dispatch. I' m wondering is that any way to make > `cl-defmethod` compatible with native-comp, AFAIK it's not *incompatible*, it's just that the dispatch functions generated by cl-defmethod stay as byte-compiled, because they're dynamically generated rather than being written into a .elc file. There's a lot of room for improvement in this area, but I think it will inevitably require specific treatment. While the speed of execution of those dispatch functions is important, the speed with which we can (re)create them is also important, so a naive approach of passing it to the native compiler to save into a temp file which we then load is likely to be too costly in some cases. Stefan