emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Type declarations in Elisp


From: Emanuel Berg
Subject: Re: Type declarations in Elisp
Date: Fri, 25 Aug 2023 22:42:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Andrea Corallo wrote:

>> FWIW here are the results before I lost interest in the
>> idea, for now at least.
>>
>> I was unable to get `elisp-benchmarks-run' to just run
>> specific benchmarks, but reading the docstring it claims
>> that it is possible, so maybe the error was on me.
>
> From the docstring of `elisp-benchmarks-run'.
>
>  If non nil SELECTOR is a regexp to match the benchmark
>  names to be executed. The test is repeated RUNS number
>  of times.
>
> emacs -batch -l ./elisp-benchmarks.el -eval
> '(elisp-benchmarks-run "bubble")'
>
> This for instance on my system runs only bubble and
> bubble-no-cons.

Indeed, that works here as well. What I did was just
evaluating, in this case

  (elisp-benchmarks-run "bubble")

i.e., without running it batch-mode. That produces the entire
table, I'm not sure how that happens even but it does say in
the _package_ documentation to run it batch-mode and that
makes more sense, also.

Still I wonder why that happens? :O

>> Also it would be beneficial if it could just be told to
>> just return the values, now it can only make a table out if
>> it - granted, it is neat and all.
>
> The values in which format?

They would be in the same format, what I had in mind was so
you would get for example the above form to evaluate into
(0.80 0.09 1 0.89 0.01) instead of

  | test           | non-gc avg (s) | gc avg (s) | gcs avg | tot avg (s) | tot 
avg err (s) |
  
|----------------+----------------+------------+---------+-------------+-----------------|
  | bubble         |           0.80 |       0.09 |       1 |        0.89 |      
      0.01 |
  | bubble-no-cons |           1.06 |       0.00 |       0 |        1.06 |      
      0.00 |
  
|----------------+----------------+------------+---------+-------------+-----------------|
  | total          |           1.86 |       0.09 |       1 |        1.95 |      
      0.01 |

And, while we are at it, maybe the documentation could also
explain these columns. It only has to be one sentence for
each, i.e. non-gc avg (s), gc avg (s), gcs avg, tot avg (s),
and tot avg err (s).

Sorry about giving you more work but these should be quick
fixes :)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]