From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Zhu Zihao Newsgroups: gmane.emacs.devel Subject: Re: On elisp running native Date: Wed, 11 Mar 2020 00:15:40 +0800 Message-ID: <8736agmbir.wl-all_but_last@163.com> References: <87eeu5txxw.wl-all_but_last@163.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="92269"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/27.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: Zhu Zihao , emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 10 17:17:30 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 1jBhZS-000NqU-0X for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Mar 2020 17:17:30 +0100 Original-Received: from localhost ([::1]:36534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBhZR-0006Mc-1G for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Mar 2020 12:17:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59183) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBhY9-00059x-Dy for emacs-devel@gnu.org; Tue, 10 Mar 2020 12:16:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBhY0-0008Ja-Ci for emacs-devel@gnu.org; Tue, 10 Mar 2020 12:16:04 -0400 Original-Received: from m12-13.163.com ([220.181.12.13]:36219) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBhXw-0007bz-JI for emacs-devel@gnu.org; Tue, 10 Mar 2020 12:16:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:Message-ID:From:Subject:MIME-Version; bh=U/M/r NRDlSFW+chaR8QDuZYJcMMV/JQ/Dqy/ZQO+nr8=; b=LRD6m1S8fKbov4KOUQ0/D iBIqyM4rXY2K9xhEptjGUGaFEvTfNNc+5CLI20Se/EkLEh8MFWOd4Tv/Hw2fu/FN kna/UvdT+kLDwqibgDU+kgq8YwOaD+OCFjQ+H2PwxebC6PMbtwJaidGGdRK+abiK e/m3Kcpaun7hEGt+Lycedk= Original-Received: from archlinux.163.com (unknown [14.121.132.186]) by smtp9 (Coremail) with SMTP id DcCowAAHDNQsvWdex4_cAw--.2218S2; Wed, 11 Mar 2020 00:15:44 +0800 (CST) In-Reply-To: X-Face: :]]%@R1{oDt0%iKgI@Kga#OZ; ogt+%OOne&J4#E*O,TIlI)yEFw--I\:3s~EV97GI$1.1!}8inmF9UgtUBB@#8>'8NWNC8qg/v*OLfQB; Z:@G3HeNf3u& ,&HpBGv%?p{bzsl'|5T";1&X X-CM-TRANSID: DcCowAAHDNQsvWdex4_cAw--.2218S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Xw4rGrW7KF4fGFW3try7Wrg_yoWxtFXEkF 9ayr1xCw4rGw1DGF4kGwn7XrZ0qayxuFyrAr92ywnF9F15Xr45Z3Z8Wr97Kry3G3y8KFy5 GanFqwn5CryrKjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRiksqtUUUUU== X-Originating-IP: [14.121.132.186] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiFADir1aD4yfpfgAAsf X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 220.181.12.13 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:245431 Archived-At: I' ve read some code of your benchmark. And there's a simple way to optimize these bench programs a littel bit. For some program use cl-defstruct, you can put `(cl-declaim (optimize (speed 3)))` in the file. This instructment will tell Emacs byte-compiler to delete runtime type check code (which is harmful in bench game) in struct accessor. An example is https://gitlab.com/koral/elisp-benchmarks/-/blob/master/benchmarks/nbody.el. After adding instructment and byte-compilation, the bench result is (benchmark-run (elb-nbody-entry)) ;; => (28.996680579 107 15.392465563000002) 28s was taken in 1000000 times iteration. And I believe native-comp will get better result. -- Zihao