From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Type declarations in Elisp (was: [External] : Re: Shrinking the C core) Date: Mon, 21 Aug 2023 11:37:05 +0000 Message-ID: <87msykfwym.fsf@localhost> References: <87il984vxv.fsf@localhost> <03fc79f4-a532-71b1-0de9-8e52bdf3f138@gmail.com> 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="31884"; mail-complaints-to="usenet@ciao.gmane.io" Cc: drew.adams@oracle.com, emacs-devel@gnu.org, incal@dataswamp.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 21 13:37:13 2023 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 1qY3Dd-000820-Cv for ged-emacs-devel@m.gmane-mx.org; Mon, 21 Aug 2023 13:37:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qY3DD-0006v2-MG; Mon, 21 Aug 2023 07:36:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qY3D7-0006ul-LN for emacs-devel@gnu.org; Mon, 21 Aug 2023 07:36:43 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qY3D4-0007An-P1 for emacs-devel@gnu.org; Mon, 21 Aug 2023 07:36:41 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E82D3240029 for ; Mon, 21 Aug 2023 13:36:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1692617795; bh=De/pseCzYB++cTjhA/sy4rx81Uc9BYhAplkiF8BR8fo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=XCtiU+ig9vidrYc1m15QpP79oZrM2rtonhE0a3FtGeoSs0KsZUjMLRTXoKQY16cJg GoQpEpVV8dDiueST53B3L9jvtKp5BqW1IzMdN2pgv0vo5LeAzqKfDQPckbO2xl3mb1 tpMXt4CV0gCHPlTViKKTFr42gZQ+ZnQZPt263l+Z8PR1lrVGUkEeYBfeTDLHggFYdL 15cFN9fC7zO500ojGHBD11uONKpc9yjGWt1SO7wbKSBNB8IJ/I2fS4dhE1Q0B5BUT6 54nSWt3Hhw2OQG2kkZRcq8bjwYKnQbedMrSulvzSX3u14j8uuvoj6UvJGrS3nj2714 ZzUv+fFzW05kA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RTr6B5c9Dz9rxH; Mon, 21 Aug 2023 13:36:34 +0200 (CEST) In-Reply-To: <03fc79f4-a532-71b1-0de9-8e52bdf3f138@gmail.com> Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309062 Archived-At: Gerd M=C3=B6llmann writes: >> I am wondering if type, ftype, and inline declarations could be added to >> Elisp. Native compilation already uses a fixed set of ftype >> declarations, but it cannot be modified and cannot be declared >> per-defun. > > I'd rather see some profile runs first that show where in some typical=20 > (tm) native-compiled ELisp program how much time is spent. Let me try. I did $ perf record make test $ perf report | 15.56% | emacs | emacs | [.] | process_mark_stack | | 9.30% | emacs | emacs | [.] | re_match_2_internal | | 4.50% | emacs | emacs | [.] | exec_byte_code | | 2.86% | emacs | emacs | [.] | readchar | | 2.16% | emacs | emacs | [.] | pdumper_marked_p_impl | | 2.13% | emacs | emacs | [.] | dump_do_dump_relocation | | 1.95% | emacs | emacs | [.] | Fmemq | | 1.88% | emacs | emacs | [.] | mark_char_table | | 1.55% | emacs | emacs | [.] | read0 | | 1.51% | emacs | emacs | [.] | oblookup | | 1.37% | emacs | emacs | [.] | md5_process_block | | 1.33% | emacs | emacs | [.] | re_search_2 | | 1.17% | emacs | emacs | [.] | Ffuncall | | 1.12% | emacs | emacs | [.] | pdumper_set_marked_impl | | 1.05% | emacs | [unknown] | [k] | 0xffffffffaae01857 | | 1.03% | emacs | ld-linux-x86-64.so.2 | [.] | 0x00000000000091b8 | | 0.94% | emacs | emacs | [.] | allocate_vectorlike | | 0.92% | emacs | emacs | [.] | unbind_to | | 0.90% | emacs | emacs | [.] | funcall_subr | | 0.90% | emacs | emacs | [.] | plist_get | | 0.82% | emacs | emacs | [.] | readbyte_from_stdio | | 0.61% | emacs | emacs | [.] | Fassq | | 0.58% | emacs | emacs | [.] | compile_pattern | | 0.57% | emacs | emacs | [.] | read_string_literal | | 0.56% | emacs | emacs | [.] | internal_equal | | 0.56% | emacs | emacs | [.] | funcall_general | | 0.55% | emacs | ld-linux-x86-64.so.2 | [.] | 0x0000000000009176 | | 0.53% | emacs | emacs | [.] | Fcons | | 0.52% | emacs | emacs | [.] | hash_lookup | | 0.51% | emacs | emacs | [.] | Fget | --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at