unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <akrl@sdf.org>
To: emacs-devel@gnu.org
Cc: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: [elpa] externals/elisp-benchmarks 8a8e9fa6a8: Make it usable on Emacs-27
Date: Thu, 10 Feb 2022 08:42:08 +0000	[thread overview]
Message-ID: <xjfee4bt8nz.fsf@ma.sdf.org> (raw)
In-Reply-To: <20220208154631.0867BC0DA37@vcs2.savannah.gnu.org> (Stefan Monnier via's message of "Tue, 8 Feb 2022 10:46:30 -0500 (EST)")

Stefan Monnier via <emacs-elpa-diffs@gnu.org> writes:

> branch: externals/elisp-benchmarks
> commit 8a8e9fa6a8c5a24841289a781a75fbb354cf71cb
> Author: Stefan Monnier <monnier@iro.umontreal.ca>
> Commit: Stefan Monnier <monnier@iro.umontreal.ca>
>
>     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



       reply	other threads:[~2022-02-10  8:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <164433519015.9248.5471973426006203013@vcs2.savannah.gnu.org>
     [not found] ` <20220208154631.0867BC0DA37@vcs2.savannah.gnu.org>
2022-02-10  8:42   ` Andrea Corallo [this message]
2022-02-10 13:55     ` [elpa] externals/elisp-benchmarks 8a8e9fa6a8: Make it usable on Emacs-27 Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xjfee4bt8nz.fsf@ma.sdf.org \
    --to=akrl@sdf.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).