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: Elisp native-comp vs. SBCL for inclist-type-hints benchmark (was: [PATCH] Re: Bignum performance) Date: Sun, 03 Sep 2023 10:30:36 +0000 Message-ID: <87fs3vmtv7.fsf@localhost> References: <874jkzllqq.fsf@yahoo.com> <2dec78a7-76e0-8789-4d20-7f0f6effe28a@gmail.com> <87pm3neei7.fsf@dataswamp.org> <87cyzjdvpq.fsf@dataswamp.org> <871qfyfgjd.fsf@localhost> <87h6ojrath.fsf@dataswamp.org> <878r9oozd5.fsf@dataswamp.org> <87r0nfmyin.fsf@localhost> <87wmx7mxsp.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38457"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Emanuel Berg , Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 03 12:31:10 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 1qckNq-0009qu-7T for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Sep 2023 12:31:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qckMp-0000Sj-Uj; Sun, 03 Sep 2023 06:30:07 -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 1qckMn-0000SW-BZ for emacs-devel@gnu.org; Sun, 03 Sep 2023 06:30:05 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qckMj-0003AK-Ow for emacs-devel@gnu.org; Sun, 03 Sep 2023 06:30:04 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AE436240101 for ; Sun, 3 Sep 2023 12:29:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693736998; bh=XhaR9u9WX+h4oYEaBJsTUd4Gfzz5Pq2yjgI+4qbPLqA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=bAa3j5qpenPA37LVJuziX4BvMcxozT72r5CbDIYyvmcDEjXrE2Ck984R5aovzqqn3 UEWni1QRKoQ/UeEevxKFgHEvf4s4tcbf16aiUm8f93xDw14cr87kPyD3/zyZ1uhUi5 gO7X3PiJfTgwwUCRv0TeI45qutuo6S6N65+VTGYUnC5fdCIJQJ3htoNlHe+0bo04my EbAaEpBJ6V1/znie2u7lA3796i5Qjok6ZoDZyWNkC4dx6aCYe8cp9F3PyelGptx/zJ +Sz4WPuiZKLc8pr7Koaq0wO6DfuVF9DEDVhbbfuocN27Xkli+YlueYQDpEu5NKtOzc Igk5+pS7Av8kA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rdp1K5fPDz9rxB; Sun, 3 Sep 2023 12:29:57 +0200 (CEST) In-Reply-To: <87wmx7mxsp.fsf@dataswamp.org> Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.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:309961 Archived-At: Emanuel Berg writes: >> Unfortunately, I cannot use this file because it is referring to >> ~/public_html/cl/bench/timing.cl, which I do not have. > > It is in the same directory > > https://dataswamp.org/~incal/cl/bench/timing.cl It would be nice if you attached the files to email. Otherwise, people examining this threads a few years in future may not be able to access the files. > So you have to set that manually as for now. I did, and the results are very different from yours: $ SBCL_HOME=/usr/lib64/sbcl sbcl --load /tmp/inclist.cl ;; 1.096667 s real time ;; 1.096235 s run time $ SBCL_HOME=/usr/lib64/sbcl sbcl --load /tmp/inclist-type-hints.cl ;; 0.55 s real time ;; 0.549992 s run time (emacs master) $ perf record ./src/emacs -batch -l /home/yantar92/.emacs.d/straight/repos/elisp-benchmarks/elisp-benchmarks.el --eval '(setq elb-speed 2)' --eval '(elisp-benchmarks-run "inclist")' * Results | test | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot avg err (s) | |--------------------+----------------+------------+---------+-------------+-----------------| | inclist | 1.20 | 0.00 | 0 | 1.20 | 0.02 | | inclist-type-hints | 1.05 | 0.00 | 0 | 1.05 | 0.02 | |--------------------+----------------+------------+---------+-------------+-----------------| | total | 2.26 | 0.00 | 0 | 2.26 | 0.02 | inclist: 1.1 sec vs. 1.2 sec inclist-type-hints: 0.55 sec vs. 1.05 sec with native-comp speed 3, the results are on par for inclist $ perf record ./src/emacs -batch -l /home/yantar92/.emacs.d/straight/repos/elisp-benchmarks/elisp-benchmarks.el --eval '(setq elb-speed 3)' --eval '(elisp-benchmarks-run "inclist")' * Results | test | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot avg err (s) | |--------------------+----------------+------------+---------+-------------+-----------------| | inclist | 1.07 | 0.00 | 0 | 1.07 | 0.02 | | inclist-type-hints | 0.99 | 0.00 | 0 | 0.99 | 0.00 | |--------------------+----------------+------------+---------+-------------+-----------------| inclist: 1.1 sec vs. 1.07 sec inclist-type-hints: 0.55 sec vs. 0.99 sec There is nothing obvious that is slower in Elisp - most of the time is spent in the native compiled functions: 47.83% emacs inclist-b6453dcf-34842bf7.eln [.] F656c622d696e636c697374_elb_inclist_0 44.80% emacs inclist-type-hints-bb635d76-535ebfb0.eln [.] F656c622d696e636c6973742d7468_elb_inclist_th_0 1.45% emacs emacs [.] process_mark_stack So, might be some missing optimization in native-comp itself. CCing Andrea, in case if he has some insight about further analysis. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at