From: Pip Cet <pipcet@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 36597@debbugs.gnu.org
Subject: bug#36597: 27.0.50; rehash hash tables eagerly in pdumper
Date: Sun, 14 Jul 2019 16:54:52 +0000 [thread overview]
Message-ID: <CAOqdjBdA6UubLzN41SGUaGDnf8WTYzThPSWcn_aDUPLZu9ZrYQ@mail.gmail.com> (raw)
In-Reply-To: <74235afc-7043-1da7-7c71-07f0ca23b9fd@cs.ucla.edu>
On Sun, Jul 14, 2019 at 3:49 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
> Pip Cet wrote:
> > Indeed, that's plenty of small Emacs processes not doing very much.
> > It's not the case we ought to be optimizing for, I think, but the
> > performance concerns should be taken seriously.
>
> What's a good benchmark for what we should be optimizing for? Ideally something
> somewhat-realistic as opposed to a microbenchmark.
I'd suggest something along the lines of:
perf stat -r 10 --table -e
cycles:u,instructions:u,branches:u,branch-misses:u make -B
../lisp/leim/ja-dic/ja-dic.el
With my patch:
61,136,837,192 cycles:u
( +- 0.42% )
42,313,912,525 instructions:u # 0.69 insn per
cycle ( +- 0.00% )
12,131,893,779 branches:u
( +- 0.00% )
47,602,747 branch-misses:u # 0.39% of all
branches ( +- 1.11% )
without my patch:
61,460,927,899 cycles:u
( +- 0.44% )
42,358,289,131 instructions:u # 0.69 insn per
cycle ( +- 0.00% )
12,134,582,441 branches:u
( +- 0.00% )
48,540,232 branch-misses:u # 0.40% of all
branches ( +- 1.09% )
A 0.5% improvement.
By comparison,
perf stat -r 100 --table -e
cycles:u,instructions:u,branches:u,branch-misses:u
~/git/emacs/src/emacs -Q --batch
With my patch:
80,749,425 cycles:u
( +- 0.81% )
146,770,045 instructions:u # 1.82 insn per
cycle ( +- 0.00% )
29,218,226 branches:u
( +- 0.00% )
450,275 branch-misses:u # 1.54% of all
branches ( +- 0.11% )
without my patch:
78,896,395 cycles:u
( +- 0.12% )
147,059,777 instructions:u # 1.86 insn per
cycle ( +- 0.00% )
29,287,917 branches:u
( +- 0.00% )
450,194 branch-misses:u # 1.54% of all
branches ( +- 0.09% )
About a 2% slowdown.
perf stat -r cycles:u,instructions:u,branches:u,missed-branches:u
> is dominated by a single CPU-intensive Emacs process and takes about 19 CPU
> seconds on my home desktop. The proposed patch slows this benchmark down by
> about 0.6%. (I ran the benchmark ten times after a warmup run, and took the
> average of the ten user+system times.)
Hmm. I'd like to know the reason for that, but I suspect it may simply
be thermal throttling. That's the reason I'm running tests in
parallel, though it might be better to compare instruction counts or
scheduled µ-ops rather than cycles...
next prev parent reply other threads:[~2019-07-14 16:54 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 14:05 bug#36597: 27.0.50; rehash hash tables eagerly in pdumper Pip Cet
2019-07-14 14:39 ` Paul Eggert
2019-07-14 15:01 ` Pip Cet
2019-07-14 15:49 ` Paul Eggert
2019-07-14 16:54 ` Pip Cet [this message]
2019-07-15 14:39 ` Pip Cet
2019-07-19 7:23 ` Pip Cet
2019-07-19 7:46 ` Eli Zaretskii
2019-07-20 12:38 ` Pip Cet
2019-07-21 3:18 ` Paul Eggert
2019-07-21 5:34 ` Pip Cet
2019-07-21 6:32 ` Paul Eggert
2019-07-21 6:32 ` Pip Cet
2020-08-09 19:27 ` Lars Ingebrigtsen
2020-08-10 11:51 ` Pip Cet
2020-08-10 13:04 ` Lars Ingebrigtsen
2020-08-11 9:33 ` Paul Eggert
2020-08-11 9:40 ` Pip Cet
2020-08-11 11:50 ` Lars Ingebrigtsen
2020-08-11 14:52 ` Eli Zaretskii
2020-08-11 15:30 ` Paul Eggert
2020-08-11 17:00 ` Eli Zaretskii
2020-08-11 18:11 ` Paul Eggert
2020-08-11 18:35 ` Eli Zaretskii
2020-08-11 18:55 ` Eli Zaretskii
2020-08-11 23:43 ` Paul Eggert
2020-08-12 14:10 ` Eli Zaretskii
2020-08-12 14:46 ` Eli Zaretskii
2020-08-12 19:11 ` Paul Eggert
2020-08-12 19:28 ` Eli Zaretskii
2020-08-12 20:41 ` Andy Moreton
2020-08-11 15:59 ` Pip Cet
2020-08-11 17:00 ` Eli Zaretskii
2020-08-11 17:31 ` Paul Eggert
2020-08-11 18:27 ` Andy Moreton
2020-08-11 18:32 ` Eli Zaretskii
2019-07-18 5:39 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOqdjBdA6UubLzN41SGUaGDnf8WTYzThPSWcn_aDUPLZu9ZrYQ@mail.gmail.com \
--to=pipcet@gmail.com \
--cc=36597@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.