[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 78% speed up in CC Mode scrolling.

From: Alan Mackenzie
Subject: Re: 78% speed up in CC Mode scrolling.
Date: Sun, 3 Jul 2016 19:39:48 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Eli.

On Sun, Jul 03, 2016 at 10:27:54PM +0300, Eli Zaretskii wrote:
> > Date: Sun, 3 Jul 2016 18:29:57 +0000
> > From: Alan Mackenzie <address@hidden>

> > Scrolling through emacs-25's xdisp.c, I get the following timings:
> >   emacs-25 branch: 45.529s
> >   master branch:   25.529s

> > This is a speedup of around 78%.

> Please show your benchmark code, and please tell which compiler
> options were used to build Emacs.  Otherwise, I don't know how to
> reproduce this.

  (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)))
      (- (float-time) start)))

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

Do C-x C-f ..../src/xdisp.c, then without scrolling it otherwise, M-:
(time-scroll).  My measurements were done on a Linux virtual tty.

My .configure options were:

   ./configure --with-tiff=no --with-gif=no --with-gpm

.  The default values of CFLAGS, etc., were used.

> > If you frequently hold down C-v or M-v, you are recommended to set
> > `fast-but-imprecise-scrolling' to non-nil.

> What does this recommendation have to do with the speedup?

Nothing, really.  But it seemed relevant, perhaps for people running at
low levels of compiler optimisation.

> Thanks.

Alan Mackenzie (Nuremberg, Germany).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]