GNU bug report logs - #75359
[scratch/elisp-benchmarks] test dependencies

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> protonmail.com>

Date: Sat, 4 Jan 2025 16:38:03 UTC

Severity: wishlist

To reply to this bug, email your comments to 75359 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75359; Package emacs. (Sat, 04 Jan 2025 16:38:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pip Cet <pipcet <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 04 Jan 2025 16:38:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [scratch/elisp-benchmarks] test dependencies
Date: Sat, 04 Jan 2025 16:37:26 +0000
There are dependencies between emacs-lisp-benchmarks tests, meaning we
can't always modify one test without affecting others.  The ones I'm
aware of are:

- elb-bytecomp.el uses elb-smie.el as compilation input (in this
  context, elb-smie.el is a "resource", not source code).  If we
  modify elb-smie.el, elb-bytecomp.el results will change and become
  uncomparable.

- elb-scroll.el uses elb-smie.el as a prerequisite.  If we modify
  elb-smie.el, elb-scroll.el results will change and become
  uncomparable.  Furthermore, elb-scroll.el relies on elb-smie.el
  being compiled in the appropriate fashion by some external
  mechanism.  (I think the best solution here is to merge elb-smie.el
  and elb-scroll.el into a single file declaring several tests, using
  the established ERT test framework)

- bubble.el and bubble-no-cons.el both "provide" the same feature.
  I'm not sure whether this causes any acute problems, but it
  demonstrates that the inconsistent use of (provide) in the
  benchmarks is problematic.  If we ever load tests using Frequire, we
  will load the wrong files.  If we don't, provide shouldn't be
  necessary.

- xmenu.c is used as a resource; this is fine.  But we must make sure
  we never copy the "current" xmenu.c to the benchmarks directory
  without clearly indicating that the benchmark results will become
  uncomparable.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75359; Package emacs. (Mon, 06 Jan 2025 09:54:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <acorallo <at> gnu.org>
To: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: 75359 <at> debbugs.gnu.org, Pip Cet <pipcet <at> protonmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#75359: [scratch/elisp-benchmarks] test dependencies
Date: Mon, 06 Jan 2025 04:53:45 -0500
Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

> There are dependencies between emacs-lisp-benchmarks tests, meaning we
> can't always modify one test without affecting others.  The ones I'm
> aware of are:
>
> - elb-bytecomp.el uses elb-smie.el as compilation input (in this
>   context, elb-smie.el is a "resource", not source code).  If we
>   modify elb-smie.el, elb-bytecomp.el results will change and become
>   uncomparable.

Shouldn't we just copy of elb-smie.el to resources?

> - elb-scroll.el uses elb-smie.el as a prerequisite.  If we modify
>   elb-smie.el, elb-scroll.el results will change and become
>   uncomparable.  Furthermore, elb-scroll.el relies on elb-smie.el
>   being compiled in the appropriate fashion by some external
>   mechanism.  (I think the best solution here is to merge elb-smie.el
>   and elb-scroll.el into a single file declaring several tests, using
>   the established ERT test framework)

I'm not sure these are real/serious bugs, different versions of
elisp-benchmarks don't guarantee to give comparable results (like every
benchmark).  Anyway adding Stefan who added this code.

> - bubble.el and bubble-no-cons.el both "provide" the same feature.
>   I'm not sure whether this causes any acute problems, but it
>   demonstrates that the inconsistent use of (provide) in the
>   benchmarks is problematic.  If we ever load tests using Frequire, we
>   will load the wrong files.  If we don't, provide shouldn't be
>   necessary.

AFAIU the provide is not used by elisp-benchmarks, anyway the typo is
now fixed.

> - xmenu.c is used as a resource; this is fine.  But we must make sure
>   we never copy the "current" xmenu.c to the benchmarks directory
>   without clearly indicating that the benchmark results will become
>   uncomparable.

Again, changes to the benchmark pertubating results should be tagged as
a new version, so will be fine to update xmenu.c if necessary as long as
we update elisp-benchmarks version.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75359; Package emacs. (Mon, 06 Jan 2025 09:54:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75359; Package emacs. (Mon, 06 Jan 2025 14:36:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Andrea Corallo <acorallo <at> gnu.org>
Cc: Pip Cet <pipcet <at> protonmail.com>, "Pip Cet via Bug reports for GNU Emacs,
 the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>, 75359 <at> debbugs.gnu.org
Subject: Re: bug#75359: [scratch/elisp-benchmarks] test dependencies
Date: Mon, 06 Jan 2025 09:35:40 -0500
>> There are dependencies between emacs-lisp-benchmarks tests, meaning we
>> can't always modify one test without affecting others.  The ones I'm
>> aware of are:
>>
>> - elb-bytecomp.el uses elb-smie.el as compilation input (in this
>>   context, elb-smie.el is a "resource", not source code).  If we
>>   modify elb-smie.el, elb-bytecomp.el results will change and become
>>   uncomparable.
>
> Shouldn't we just copy of elb-smie.el to resources?

If so, we could just as well use some other file.  I used `elb-smie.el`
because it was a large enough file and it was already part of
`elisp-benchmarks`.

>> - elb-scroll.el uses elb-smie.el as a prerequisite.  If we modify
>>   elb-smie.el, elb-scroll.el results will change and become
>>   uncomparable.  Furthermore, elb-scroll.el relies on elb-smie.el
>>   being compiled in the appropriate fashion by some external
>>   mechanism.  (I think the best solution here is to merge elb-smie.el
>>   and elb-scroll.el into a single file declaring several tests, using
>>   the established ERT test framework)
>
> I'm not sure these are real/serious bugs, different versions of
> elisp-benchmarks don't guarantee to give comparable results (like every
> benchmark).

Agreed.
This said, merging `elb-smie.el` and `elb-scroll.el` would be fine.
Can't remember why I didn't do that from the start.

[ Not sure what ERT has to do with it, BTW.  ]

>> - bubble.el and bubble-no-cons.el both "provide" the same feature.
>>   I'm not sure whether this causes any acute problems, but it
>>   demonstrates that the inconsistent use of (provide) in the
>>   benchmarks is problematic.  If we ever load tests using Frequire, we
>>   will load the wrong files.  If we don't, provide shouldn't be
>>   necessary.
>
> AFAIU the provide is not used by elisp-benchmarks, anyway the typo is
> now fixed.

FWIW, these two files date back to the time where the benchmarks were
defined by their file (i.e. one file per benchmark), whereas nowadays
the benchmarks are defined by the `elb-*-entry` functions, so we should
probably merge those two files into one.

>> - xmenu.c is used as a resource; this is fine.  But we must make sure
>>   we never copy the "current" xmenu.c to the benchmarks directory
>>   without clearly indicating that the benchmark results will become
>>   uncomparable.
> Again, changes to the benchmark pertubating results should be tagged as
> a new version, so will be fine to update xmenu.c if necessary as long as
> we update elisp-benchmarks version.

Also I can't think of any reason why we'd want to "update" that file.
At least not until its use of the C language is considered too
antiquated/deprecated.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75359; Package emacs. (Mon, 06 Jan 2025 14:36:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75359; Package emacs. (Mon, 06 Jan 2025 14:49:01 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "Pip Cet via \"Bug reports for GNU Emacs,
 the Swiss army knife of text editors\"" <bug-gnu-emacs <at> gnu.org>,
 Andrea Corallo <acorallo <at> gnu.org>, 75359 <at> debbugs.gnu.org
Subject: Re: bug#75359: [scratch/elisp-benchmarks] test dependencies
Date: Mon, 06 Jan 2025 14:47:44 +0000
"Stefan Monnier" <monnier <at> iro.umontreal.ca> writes:

> This said, merging `elb-smie.el` and `elb-scroll.el` would be fine.
> Can't remember why I didn't do that from the start.

Did that on my branch :-)

> [ Not sure what ERT has to do with it, BTW.  ]

See the "make benchmark" discussion, if you really want to :-)

Context: I have extended ERT so it has some minimal benchmarking
functionality, after investigating (twice) whether elisp-benchmarks.el
can't be made to do the job.  My conclusion was that that would take too
much time, we should use ERT and ditch elisp-benchmarks.el, modifying
the benchmarks instead.

Andrea asked for bug reports, I provided some, but my opinion is that
spending further time on elisp-benchmarks.el isn't productive, so I
won't.

Pip





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75359; Package emacs. (Mon, 06 Jan 2025 14:49:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75359; Package emacs. (Mon, 06 Jan 2025 15:00:02 GMT) Full text and rfc822 format available.

Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Pip Cet <pipcet <at> protonmail.com>
Cc: "Pip Cet via \"Bug reports for GNU
 Emacs, the Swiss army knife of text editors\"" <bug-gnu-emacs <at> gnu.org>,
 Andrea Corallo <acorallo <at> gnu.org>, 75359 <at> debbugs.gnu.org
Subject: Re: bug#75359: [scratch/elisp-benchmarks] test dependencies
Date: Mon, 06 Jan 2025 09:59:19 -0500
> Context: I have extended ERT so it has some minimal benchmarking
> functionality, after investigating (twice) whether elisp-benchmarks.el
> can't be made to do the job.  My conclusion was that that would take too
> much time, we should use ERT and ditch elisp-benchmarks.el, modifying
> the benchmarks instead.

I don't have any opinion on that.  The `elisp-benchmark.el` code itself
is very small/trivial, so rewriting it should be quite easy.

[ Then again, I can't think of any reason why any of it would take "much
  time", whether modifying `elisp-benchmarks.el`, or extending ERT, or
  writing it all from scratch.  So I'm probably missing something.  ]


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75359; Package emacs. (Mon, 06 Jan 2025 15:00:03 GMT) Full text and rfc822 format available.

Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 02 Mar 2025 04:12:02 GMT) Full text and rfc822 format available.

This bug report was last modified 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.