emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] comment-cache 223d16f 2/3: Apply `comment-depth' text


From: martin rudalics
Subject: Re: [Emacs-diffs] comment-cache 223d16f 2/3: Apply `comment-depth' text properties when calling `back_comment'.
Date: Wed, 09 Mar 2016 20:58:23 +0100

> ... and so far there's been no
> feedback from anybody else who's tried it.

With emacs -Q and non-optimized builds I've been profiling the following
two primitives

(defun foo ()
  (interactive)
  (while (not (eobp))
    (c-end-of-defun)))

(defun bar ()
  (interactive)
  (while (not (bobp))
    (c-beginning-of-defun)))

to scan the entire buffer of current master's xdisp.c.  The results of
current master with or without your change are approximately the same
‘foo’ taking about 73 seconds, ‘bar’ about 8 minutes, in both cases the
comment-cache version was slightly slower.

However, ‘foo’ is about ten times slower than for a version of Emacs
24.2 which is about two times slower than for a version of Emacs 23.0.
‘bar’ is about 5 times slower than the Emacs 24.2 version which is 3.5
times slower than the one from Emacs 23.0.

So, for example, executing ‘bar’ for my Emacs 23.0 took 24.89 seconds
(0.068 for an average call) versus 464.375 seconds (1.272 average) with
the comment-cache version.  This means that performance has deteriorated
by a factor of 18 over the past years.  This also means that I cannot
use non-optimized builds for my daily work any more.

Maybe someone could try to test these two functions in a similar fashion
so we have at least some numbers to base judgements on.  Sometimes it
seems to me that I'm living in a different world ...

Thanks, martin




reply via email to

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