unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Gemini Lasswell <gazally@runbox.com>
Cc: michael_heerdegen@web.de, Eli Zaretskii <eliz@gnu.org>,
	cpitclaudel@gmail.com, monnier@IRO.UMontreal.CA,
	emacs-devel@gnu.org
Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps.
Date: Mon, 26 Nov 2018 12:39:13 +0000	[thread overview]
Message-ID: <20181126123913.GD4030@ACM> (raw)
In-Reply-To: <87ftvphu2h.fsf@runbox.com>

Hello, Gemini.

On Sun, Nov 25, 2018 at 10:48:38 -0800, Gemini Lasswell wrote:
> Alan Mackenzie <acm@muc.de> writes:

> > The branch scratch/accurate-warning-pos now bootstraps.  (It also now
> > runs on optimised builds. ;-)
> >
> > Its bootstrap is a mere 7.1% slower than master's.

> Hi Alan,

> Great progress!  There are clearly benefits to Emacs Lisp programmers
> (especially if errors and debugger backtraces can someday have accurate
> source positions), to be weighed against the cost of a slower Emacs for
> all the non-Lisp programmers and non-programmers who work with Emacs.  I
> don't know how to begin to sort that out, but since I've been working on
> creating a benchmark suite for Emacs, I'm thrilled you've given me such
> an interesting test case. :)

:-)

> Here's how much longer in percentage terms the tasks in my nascent
> benchmark suite take in your branch compared to 5b218be0c3, the commit
> your branch is based on, running on my newish Linux laptop.  I'll push
> my benchmarking project to a scratch branch soon so you can see the code
> which was benchmarked.

> cus-theme-tasks-load-tango: 9%
> bytecomp-tasks-compile-doc: 24%
> kmacro-tasks-edit-lines: 18%
> fill-tasks-fill-paragraph: 15%
> cmds-tasks-forward-line: 5%
> data-tasks-prime-p: 1%
> emacs-tasks-startup: 4%
> syntax-tasks-backward-word: 23%
> syntax-tasks-forward-word: 20%

Ouch!  That's slower than I had anticipated or measured myself.

From this point on, I probably look a bit defensive.  Forgive me for
this.

I'm guessing what each benchmark tested.  I see you've pushed a scratch
branch for this, but I haven't looked at this yet.

syntax-tasks-{backward,forward}-word presumably time backward-word and
forward-word.  bytecomp-tasks-compile-doc I'm not sure about, is that
the extraction of doc strings from .elc files?

After getting over my knee-jerk reaction, my thoughts are that these
timings are not of things which, of themselves, would directly concern a
user.  A fill-paragraph will take 15% more time, but would a user
actually notice this, given that the operation is usually instantaneous?

Good things to benchmark would be interactive commands which feel a bit
sluggish anyway.  CC Mode redisplay is a good candidate for this (see
below).  ;-)

From your timings, my gut feeling is that the 15% slowdown in
fill-tasks-fill-paragraph probably represents fairly closely the
slowdown in Emacs as a whole.  It is testing a "macro" operation rather
than an isolated primitive.

> Here's a benchmark report, which contains the measurements from which I
> calculated those percentages:

[ .... ]

> Each timing value in this file is the average of 30 runs of the task.
> Here's the same report, exported with graphs from gnuplot (and page
> breaks in the wrong places):

Thanks for doing this!  One positive thing is that the new Emacs hasn't
fallen over.  ;-)

My 8% (approximate) I measured by scrolling through xdisp.c, displaying
each window's worth on the way.  Before repeating this timing, it's
necessary to insert a character at BOB then undo the insertion, so as to
erase the face and other properties throughout the buffer.

Perhaps you might be able to adapt this exercise into your branch.  At
any rate, I'd be interested if you could compare the timings on your
machine between old and new Emacs versions.

The code to run this follows.  Do M-: (time-scroll) to start it.

(defmacro time-it (&rest forms)
  "Time the running of a sequence of forms using `float-time'.
Call like this: \"M-: (time-it (foo ...) (bar ...) ...)\"."
  `(let ((start (float-time)))
    ,@forms
    (- (float-time) start)))

(defun time-scroll (&optional arg)
  (interactive "P")
  (message "%s"
           (time-it
            (condition-case nil
                (while t
                  (if arg (scroll-down) (scroll-up))
                  (sit-for 0))
              (error nil)))))

-- 
Alan Mackenzie (Nuremberg, Germany).



  parent reply	other threads:[~2018-11-26 12:39 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17 12:45 scratch/accurate-warning-pos: First tentative successes Alan Mackenzie
2018-11-17 13:13 ` Eli Zaretskii
2018-11-23 13:09   ` scratch/accurate-warning-pos: Solid progress: the branch now bootstraps Alan Mackenzie
2018-11-25 11:26     ` Charles A. Roelli
2018-11-25 14:31       ` Alan Mackenzie
2018-11-25 15:12         ` Andreas Schwab
2018-11-25 15:42           ` Alan Mackenzie
2018-11-25 16:40             ` Eli Zaretskii
2018-11-25 17:59               ` Alan Mackenzie
2018-11-25 18:15                 ` Eli Zaretskii
2018-11-25 18:23                   ` Alan Mackenzie
2018-11-25 19:36                     ` Alan Mackenzie
2018-11-25 16:22         ` Stefan Monnier
2018-11-25 17:35           ` Alan Mackenzie
2018-11-25 18:22             ` Stefan Monnier
2018-11-25 19:54               ` Alan Mackenzie
2018-11-25 20:08                 ` Stefan Monnier
2018-11-26  9:52                   ` Alan Mackenzie
2018-11-26 10:16                     ` Alan Mackenzie
2018-11-25 16:38         ` Eli Zaretskii
2018-11-25 17:27           ` Andreas Schwab
2018-11-25 17:31           ` Alan Mackenzie
2018-11-25 17:39             ` Eli Zaretskii
2018-11-25 18:08               ` Alan Mackenzie
2018-11-25 18:45       ` Paul Eggert
2018-11-25 19:30         ` Alan Mackenzie
2018-11-25 20:12           ` Paul Eggert
2018-11-25 21:29             ` Alan Mackenzie
2018-11-26  1:41               ` Paul Eggert
2018-11-26  3:41                 ` Eli Zaretskii
2018-11-26 17:43                   ` Paul Eggert
2018-11-26 18:43                     ` Alan Mackenzie
2018-11-26 19:18                       ` Clément Pit-Claudel
2018-11-26 19:42                         ` Alan Mackenzie
2018-11-27  1:07                           ` Gemini Lasswell
2018-11-27  1:45                             ` Alan Mackenzie
2018-11-27  6:06                             ` Eli Zaretskii
2018-11-27  2:48                       ` Paul Eggert
2018-11-27  7:43                         ` Alan Mackenzie
2018-11-27 20:27                           ` Paul Eggert
2018-11-27 21:15                             ` Alan Mackenzie
2018-11-27 21:37                               ` Paul Eggert
2018-11-27 21:53                                 ` Alan Mackenzie
2018-11-28  1:11                                   ` Paul Eggert
2018-11-28 12:04                                     ` Alan Mackenzie
2018-11-29 21:28                                       ` Paul Eggert
2018-11-29 22:05                                         ` Alan Mackenzie
2018-11-30 17:50                                           ` Paul Eggert
2018-11-30 18:55                                             ` Alan Mackenzie
2018-11-30 20:14                                               ` Paul Eggert
2018-11-30 22:02                                                 ` Alan Mackenzie
2018-11-30 23:46                                                   ` Paul Eggert
2018-12-01  7:35                                                     ` martin rudalics
2018-12-01  8:25                                                       ` Eli Zaretskii
2018-12-01 11:08                                                         ` Alan Mackenzie
2018-12-01 11:36                                                           ` Eli Zaretskii
2018-12-01 12:47                                                       ` Alan Mackenzie
2018-12-01 14:09                                                         ` martin rudalics
2018-12-01 14:30                                                           ` Stefan Monnier
2018-12-01 16:30                                                             ` martin rudalics
2018-12-01 19:56                                                               ` Stefan Monnier
2018-12-01 14:59                                                           ` Eli Zaretskii
2018-12-01 16:31                                                             ` martin rudalics
2018-12-01 16:53                                                               ` Eli Zaretskii
2018-12-01 19:04                                                                 ` martin rudalics
2018-12-01 19:22                                                                   ` Eli Zaretskii
2018-12-01 17:21                                                           ` Alan Mackenzie
2018-12-01 17:44                                                             ` Michael Heerdegen
2018-12-01 18:58                                                               ` Alan Mackenzie
2018-12-01 20:26                                                                 ` Alan Mackenzie
2018-12-01 17:48                                                             ` Eli Zaretskii
2018-12-01 21:00                                                               ` Paul Eggert
2018-12-01 17:50                                                             ` Clément Pit-Claudel
2018-12-01 18:26                                                               ` Yuri Khan
2018-12-01 19:15                                                                 ` Clément Pit-Claudel
2018-12-01 21:26                                                                 ` Paul Eggert
2018-12-02  6:48                                                                   ` Yuri Khan
2018-12-02 18:39                                                                   ` Gemini Lasswell
2018-12-03  2:28                                                                     ` Stefan Monnier
2018-12-01 19:04                                                             ` martin rudalics
2018-12-02 22:53                                                             ` Dmitry Gutov
2018-12-01  0:26                                               ` Gemini Lasswell
2018-12-01 11:48                                                 ` Alan Mackenzie
2018-11-27 22:09                                 ` Stefan Monnier
2018-11-28  2:18                                   ` Paul Eggert
2018-11-28  2:43                                     ` Stefan Monnier
2018-11-28  5:13                                       ` Paul Eggert
2018-11-28  6:03                                       ` Gemini Lasswell
2018-11-28  5:39                                   ` Gemini Lasswell
2018-11-28 13:06                                     ` Stefan Monnier
2018-11-28  6:28                                 ` Eli Zaretskii
2018-11-28 22:50                                   ` Paul Eggert
2018-11-29  7:19                                     ` Eli Zaretskii
2018-11-29 10:54                                     ` Alan Mackenzie
2018-11-29 11:13                                       ` Eli Zaretskii
2018-11-29 11:37                                         ` Alan Mackenzie
2018-11-29 21:12                                           ` Paul Eggert
2018-11-29 21:28                                             ` Alan Mackenzie
2018-11-28  0:53                               ` Gemini Lasswell
2018-11-26 20:04                     ` Stefan Monnier
2018-11-27  2:51                       ` Paul Eggert
2018-11-26  9:48                 ` Alan Mackenzie
2018-11-26 18:27                   ` Paul Eggert
2018-11-25 18:48     ` Gemini Lasswell
2018-11-25 20:02       ` Stefan Monnier
2018-11-26 12:39       ` Alan Mackenzie [this message]
2018-11-26 16:14         ` Gemini Lasswell
2018-11-26 17:06           ` Alan Mackenzie
2018-11-26 17:24             ` Alan Mackenzie
2018-11-29 12:26     ` scratch/accurate-warning-pos: Some real world timings Alan Mackenzie

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=20181126123913.GD4030@ACM \
    --to=acm@muc.de \
    --cc=cpitclaudel@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gazally@runbox.com \
    --cc=michael_heerdegen@web.de \
    --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).