[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: |
Wed, 28 Apr 2021 11:34:13 +0000 |
Hello, Eli.
On Mon, Apr 26, 2021 at 20:25:17 +0300, Eli Zaretskii wrote:
> > Date: Mon, 26 Apr 2021 17:02:44 +0000
> > Cc: akrl@sdf.org, emacs-devel@gnu.org
> > From: Alan Mackenzie <acm@muc.de>
> > 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.
> Yes, for this benchmark, I find the natively-compiled code somewhat
> (by about 5%) _slower_ than the byte-compiled code. But this
> benchmark only shows off the fontifications, so maybe it isn't
> surprising. CC Mode is much more than that.
I wrote another benchmark which removes all indentation, then reindents
every line:
(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-indent ()
(interactive)
(save-excursion
(goto-char (point-min))
(while (not (eobp))
(delete-horizontal-space)
(beginning-of-line 2))
(goto-char (point-min))
(message "%s"
(time-it
(while (not (eobp))
(c-indent-line)
(beginning-of-line 2))))))
Run with M-: (time-indent).
The timings on src/minibuf.c were:
(i) .elc files: 6.31s.
(ii) .eln files: 5.44s.
, which is around a 13% speed up.
--
Alan Mackenzie (Nuremberg, Germany).
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, (continued)
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Eli Zaretskii, 2021/04/25
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Alan Mackenzie, 2021/04/25
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Eli Zaretskii, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Alan Mackenzie, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Eli Zaretskii, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Alan Mackenzie, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Eli Zaretskii, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Alan Mackenzie, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Stefan Monnier, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Eli Zaretskii, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk,
Alan Mackenzie <=
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Eli Zaretskii, 2021/04/28
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Alan Mackenzie, 2021/04/28
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Eli Zaretskii, 2021/04/28
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Andrea Corallo, 2021/04/28
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Óscar Fuentes, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Eli Zaretskii, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Óscar Fuentes, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Alan Mackenzie, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Óscar Fuentes, 2021/04/26
- Re: master 289000e: Merge branch 'feature/native-comp' into trunk, Alan Mackenzie, 2021/04/28