From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: [elpa] externals/elisp-benchmarks 8a8e9fa6a8: Make it usable on Emacs-27 Date: Thu, 10 Feb 2022 08:42:08 +0000 Message-ID: References: <164433519015.9248.5471973426006203013@vcs2.savannah.gnu.org> <20220208154631.0867BC0DA37@vcs2.savannah.gnu.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="19091"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 10 10:02:41 2022 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 1nI5Lc-0004il-86 for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Feb 2022 10:02:40 +0100 Original-Received: from localhost ([::1]:53744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nI5La-0008CJ-OR for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Feb 2022 04:02:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI51o-0000vF-Ik for emacs-devel@gnu.org; Thu, 10 Feb 2022 03:42:13 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:62055) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI51m-00027E-4b for emacs-devel@gnu.org; Thu, 10 Feb 2022 03:42:12 -0500 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 21A8g8EE001569 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 10 Feb 2022 08:42:08 GMT In-Reply-To: <20220208154631.0867BC0DA37@vcs2.savannah.gnu.org> (Stefan Monnier via's message of "Tue, 8 Feb 2022 10:46:30 -0500 (EST)") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:286128 Archived-At: Stefan Monnier via writes: > branch: externals/elisp-benchmarks > commit 8a8e9fa6a8c5a24841289a781a75fbb354cf71cb > Author: Stefan Monnier > Commit: Stefan Monnier > > Make it usable on Emacs-27 > > Also scale some of the benchmarks so they don't take less than 1s on my > test machine. > > * elisp-benchmarks.el (elb-std-deviation): Handle empty list. > (elisp-benchmarks-run): Catch errors so the benchmark suite can be used > on Emacs-27 even if not all of the benchmarks can be used. > > * benchmarks/pack-unpack.el: Place the old code first so it still gets > defined even if the new code signals an error. > * benchmarks/elb-bytecomp.el (elb-bytecomp-entry): > * benchmarks/elb-eieio.el (elb-eieio-entry): > * benchmarks/elb-smie.el (elb-smie-entry): Increase run time a bit. > (elb-smie--boi, elb-smie-mode): Silence some compiler warnings. > --- > benchmarks/elb-bytecomp.el | 2 +- > benchmarks/elb-eieio.el | 2 +- > benchmarks/elb-smie.el | 4 +-- > benchmarks/fibn.el | 7 +++-- > benchmarks/pack-unpack.el | 70 ++++++++++++++++++++++++---------------------- > elisp-benchmarks.el | 33 ++++++++++++++-------- > 6 files changed, 65 insertions(+), 53 deletions(-) > [...] > diff --git a/elisp-benchmarks.el b/elisp-benchmarks.el > index 4fe10b87a4..f6943b9784 100644 > --- a/elisp-benchmarks.el > +++ b/elisp-benchmarks.el > @@ -77,7 +77,7 @@ > (let* ((n (length list)) > (mean (/ (cl-loop for x in list > sum x) > - n))) > + (max n 1)))) > (sqrt (/ (cl-loop for x in list > sum (expt (- x mean) 2)) > (1- n))))) > @@ -110,18 +110,22 @@ RECOMPILE all the benchmark folder when non nil." > (funcall compile-function f)) > test-sources)) > ;; Load > - (mapc #'load (mapcar (if (and (featurep 'native-compile) > - (fboundp 'comp-el-to-eln-filename)) > - ;; FIXME: Isn't the elc->eln > - ;; remapping fully automatic? > - #'comp-el-to-eln-filename > - #'file-name-sans-extension) > - test-sources)) > + (mapc (lambda (file) > + (with-demoted-errors "Error loading: %S" > + (load file))) > + (mapcar (if (and (featurep 'native-compile) > + (fboundp 'comp-el-to-eln-filename)) > + ;; FIXME: Isn't the elc->eln > + ;; remapping fully automatic? > + #'comp-el-to-eln-filename > + #'file-name-sans-extension) > + test-sources)) > (let ((tests (let ((names '())) > (mapatoms (lambda (s) > (let ((name (symbol-name s))) > - (when (string-match > - "\\`elb-\\(.*\\)-entry\\'" name) > + (when (and (fboundp s) > + (string-match > + "\\`elb-\\(.*\\)-entry\\'" name)) > (push (match-string 1 name) names))))) Ah okay I see now. Your previous changeset is fixed here changing the semantic of `elisp-benchmarks-run'. I think this change is an improvement but again *please* use commit messages that makes sense and break&group your commits in a meaningfull way. This change (as others) has really nothing to do with "Make it usable on Emacs-27". Best Regards Andrea