emacs-devel
[Top][All Lists]
Advanced

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

Re: The current state of the comment-cache branch


From: Alan Mackenzie
Subject: Re: The current state of the comment-cache branch
Date: Wed, 28 Dec 2016 07:54:02 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Dmitry.

On Wed, Dec 28, 2016 at 03:40:00AM +0200, Dmitry Gutov wrote:
> On 27.12.2016 18:11, Alan Mackenzie wrote:

> > Setting open-paren-in-column-0-is-defun-start to nil solves the problem,
> > but at the unacceptable cost of making CC Mode much slower (and it's not
> > the fastest mode in the first place).

> Could you show the benchmarks against that, then?

I've already posted them in this thread, but just for convenience, here
again are the timings on my machine for `time-scroll' (source below) for 
.../src/xdisp.c:

                   First forward run     Backwards     Second forward run


master:                 34.100s            36.050s         34.575s

comment-cache:          30.110s            32.275s         34.990s

master:                101.939s            95.049s        103.546s
(with open-paren-... nil)


#########################################################################
(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)))))
#########################################################################



> Please also include the alternative (syntax-ppss based) patch in the 
> comparison.

Does such a patch exist, yet?  If so, could you point me to it, please,
then I'll put it through my benchmark.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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