[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [elpa] externals/elisp-benchmarks 8a8e9fa6a8: Make it usable on Emac
From: |
Andrea Corallo |
Subject: |
Re: [elpa] externals/elisp-benchmarks 8a8e9fa6a8: Make it usable on Emacs-27 |
Date: |
Thu, 10 Feb 2022 08:42:08 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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
- Re: [elpa] externals/elisp-benchmarks 8a8e9fa6a8: Make it usable on Emacs-27,
Andrea Corallo <=