unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs-Devel <emacs-devel@gnu.org>
Subject: Re: elisp-benchmarks
Date: Thu, 10 Feb 2022 13:12:18 +0100	[thread overview]
Message-ID: <12E6EB56-966F-49F9-B6FC-13C2668F041B@acm.org> (raw)
In-Reply-To: <jwv5ypn7l9z.fsf-monnier+emacs@gnu.org>

9 feb. 2022 kl. 23.19 skrev Stefan Monnier <monnier@iro.umontreal.ca>:

> And we see that Matthias's recent improvements to the bytecode
> interpreter do make a quite significant difference on several of those
> microbenchmarks ;-), and also on the bytecompiler benchmark (offsetting
> the extra work needed for the symbol-with-positions) tho they don't make
> much of a difference when it comes to scrolling(with-jit-lock) or when
> it comes to reindenting code with SMIE :-)

You are much too kind; my own macro-benchmarks indicate that we haven't quite reached status quo ante yet.

However I would like to caution against using the 'total' line of these benchmarks and in fact suggest that it be removed entirely since it can be very misleading: it is in effect tantamount to a completely arbitrary weighting of the individual benchmarks.

If we want an aggregate number that weighs all benchmark components equally, one way is to first establish a baseline, use relative changes to that baseline, and take the geometric average of those.

But that only makes sense if we value each component equally and there is no reason to do that -- many of the benchmarks measure essentially the same thing, and the mixture cannot in any way be defended as representative of any kind of practical Emacs use.

Individual benchmarks can of course be of interest: a proper presentation would be in a table where they each can be compared across different changes. Rearranging your date and normalising to before sympos, separately for timings that exclude and include GC, gives:

|                    |      ex gc      |     inc gc      |
| test               | sympos | master | sympos | master |
|--------------------+--------+--------+--------+--------|
| bubble             |   0.95 |   0.74 |   1.00 |   0.91 |
| bubble-no-cons     |   1.01 |   0.83 |   1.01 |   0.83 |
| bytecomp           |   1.06 |   0.99 |   1.06 |   1.02 |
| dhrystone          |   1.03 |   0.80 |   1.03 |   0.80 |
| eieio              |   0.99 |   0.83 |   0.99 |   0.90 |
| fibn               |   0.99 |   0.69 |   0.99 |   0.69 |
| fibn-named-let     |   0.98 |   0.68 |   0.98 |   0.68 |
| fibn-rec           |   1.01 |   0.66 |   1.01 |   0.66 |
| fibn-tc            |   1.02 |   0.60 |   1.02 |   0.60 |
| flet               |   1.06 |   0.68 |   1.06 |   0.68 |
| inclist            |   1.07 |   0.98 |   1.07 |   0.98 |
| inclist-type-hints |   1.07 |   0.98 |   1.07 |   0.98 |
| listlen-tc         |   1.00 |   0.73 |   1.00 |   0.73 |
| map-closure        |   1.02 |   0.69 |   1.02 |   0.69 |
| nbody              |   0.97 |   0.85 |   0.99 |   0.97 |
| pack-unpack        |   0.99 |   0.80 |   0.99 |   0.90 |
| pack-unpack-old    |   1.01 |   0.91 |   1.01 |   0.94 |
| pcase              |   0.87 |   0.86 |   0.87 |   0.86 |
| pidigits           |   0.93 |   0.86 |   0.96 |   0.92 |
| scroll             |   0.97 |   1.04 |   0.97 |   1.04 |
| smie               |   1.02 |   1.01 |   1.01 |   1.01 |

which is a bit more informative (at least if you know what the benchmarks do, but otherwise it's all nonsense numbers anyway).

For the record, my own Relint benchmark (we all have our pets!) is at about 1.03 from the same baseline which is notable because it exercises a wide variety of operations, many of which weren't affected by any of the changes.

> The >10% slowdown recently seen on the test suite is still a mystery
> waiting for someone to figure out what's going on.

A config option to switch off sympos would be handy.

> BTW, I think one thing is clear when I look at those benchmarks:
> Emacs's GC is not good enough.

Indeed it's the elephant in the room. In addition, designing meaningful benchmarks that aren't GC-dominated can be tricky.




  parent reply	other threads:[~2022-02-10 12:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 22:19 elisp-benchmarks Stefan Monnier
2022-02-10  6:50 ` elisp-benchmarks Lars Ingebrigtsen
2022-02-10  7:52   ` elisp-benchmarks Eli Zaretskii
2022-02-10 12:12 ` Mattias Engdegård [this message]
2022-02-10 14:13   ` elisp-benchmarks Stefan Monnier
2022-02-10 14:18 ` elisp-benchmarks Stefan Monnier
2022-02-10 16:51   ` elisp-benchmarks Stefan Monnier
2022-02-10 21:53     ` elisp-benchmarks Mattias Engdegård
2022-02-10 22:31       ` elisp-benchmarks 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=12E6EB56-966F-49F9-B6FC-13C2668F041B@acm.org \
    --to=mattiase@acm.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).