emacs-devel
[Top][All Lists]
Advanced

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

Re: master 289000e: Merge branch 'feature/native-comp' into trunk


From: Alan Mackenzie
Subject: Re: master 289000e: Merge branch 'feature/native-comp' into trunk
Date: Mon, 26 Apr 2021 17:02:44 +0000

Hello, Eli.

On Mon, Apr 26, 2021 at 18:12:15 +0300, Eli Zaretskii wrote:
> > Date: Mon, 26 Apr 2021 14:54:11 +0000
> > Cc: akrl@sdf.org, emacs-devel@gnu.org
> > From: Alan Mackenzie <acm@muc.de>

> > Native compilation just doesn't seem to be working for me, yet.  How
> > much of a speed up should it give me?  Surely more than 5% - 10%?

> I don't know.  If you describe your benchmark, perhaps I could run it
> here and report.

I use 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)))
    ,@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)))))

Put point at the start of xdisp.c (or any other large file), optionally
type and delete a space (to clear font-lock text properties), and do M-:
(time-scroll).  This scrolls through the buffer one screenful at a time,
displaying each screenful, then reports the total time.


I've come to the conclusion in the last hour or so that CC Mode just
isn't sped up much at all by native compilation.  Using Andrea's tip of
C-h f c-mode + look for "natively compiled", it is clear that the
natively compiled files _are_ being used.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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