unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Andrea Corallo <akrl@sdf.org>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: elisp-benchmarks
Date: Sat, 07 Dec 2019 09:27:49 -0800	[thread overview]
Message-ID: <87d0d0f3l6.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <xjfzhg5dpvx.fsf@sdf.org> (Andrea Corallo's message of "Fri, 06 Dec 2019 22:56:50 +0000")

Andrea Corallo <akrl@sdf.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Andrea Corallo <akrl@sdf.org> writes:
>>
>>> Hi, I attach the patch git formatted.  I've also fixed two nits.
>>
>> Thanks for this package, and I'm looking forward to trying it out! I
>> have one question at this point, which is that it seems somewhat
>> limiting to require benchmarks to be placed into this package's own
>> benchmarks/ directory. It seems like it would be nice to let them live
>> anywhere, even if that means selecting them manually, rather than
>> forcing a single location, as the package currently seems to do (unless
>> I'm missing something?). For example, it might be nice to ship other
>> packages with their own benchmark libraries, which would then be
>> selectable somehow. What do you think?
>>
>> Thanks!
>> Eric
>
> Hi Eric,
> that's a very good point thanks for commenting.
>
> Actually with the current setup you could depose a benchmark in the
> benchmarks folder that calls say some gnus function and define a test in
> that way.  Everything would work except the 'recompile'.

Is the expectation that we'd actually be committing benchmarks to the
benchmarks package? Or just dropping files into the installation
directory? Both approaches seem a bit awkward -- for the former, you'd
have to update the benchmark package whenever any other package updated
its benchmarks. For the latter, when we update the benchmarks package,
we'll lose any files we stuck in there manually.

> I also like the idea of doing the other way around (defining benchmarks
> and have them shipped with the package itself).  This would be
> potentially more elegant but I guess we should then have the
> infrastructure to do that in Emacs and not just in ELPA.  Is this
> correct?
>
> Maybe you have in mind a different mechanism for this?

I suppose the fanciest approach would be to do what ert does: provide a
`elb-defbenchmark' macro that registers the benchmark in some central
location, and allows the user to select which of the registered
benchmarks to run. That might take more work than you'd had in mind,
though. A simpler approach might be just to make the "working directory"
argument of the interactive commands selectable with a prefix arg. Right
now the prefix arg controls the selector -- maybe that could be a
two-part selection? First directory, then string? Or something like
that.

At the very least, `elb-bench-directory' could be let-bound in a custom
function. But making it a defconst really makes it feel like we
shouldn't be doing that.

Hope that's useful,
Eric



  reply	other threads:[~2019-12-07 17:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 19:06 [ELPA] New package: elisp-benckmarks Andrea Corallo
2019-12-05 19:18 ` [ELPA] New package: elisp-benchmarks Andrea Corallo
2019-12-06 14:48   ` Andrea Corallo
2019-12-06 19:28     ` Eric Abrahamsen
2019-12-06 22:56       ` Andrea Corallo
2019-12-07 17:27         ` Eric Abrahamsen [this message]
2019-12-07 18:27           ` Stefan Monnier
2019-12-07 21:03             ` Eric Abrahamsen
2019-12-08  0:20               ` Stefan Monnier
2019-12-08 17:15                 ` Eric Abrahamsen
2019-12-08 20:38             ` Andrea Corallo
2019-12-08 21:05               ` Eric Abrahamsen
2019-12-11 11:17     ` Andrea Corallo
2019-12-18 13:13       ` Andrea Corallo
2019-12-19  4:27         ` Stefan Monnier
2019-12-19  8:42           ` Andrea Corallo

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=87d0d0f3l6.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=akrl@sdf.org \
    --cc=emacs-devel@gnu.org \
    /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).