emacs-devel
[Top][All Lists]
Advanced

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

Re: Correct line/column numbers in byte compiler messages


From: Alan Mackenzie
Subject: Re: Correct line/column numbers in byte compiler messages
Date: Sun, 22 Mar 2020 11:26:19 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Andrea.

On Sat, Mar 21, 2020 at 20:19:54 +0000, Alan Mackenzie wrote:
> On Sat, Mar 21, 2020 at 18:37:13 +0000, Andrea Corallo wrote:
> > Have to apologize this is probably the quarantine effect ....

> As of today, we're under quarantine, too.  :-(

> > .... but I couldn't resist testing this:

> > #+BEGIN_SRC lisp
> > ;; -*- lexical-binding: t; -*-
> > (require 'cl-lib)
> > (defvar elb-list (cl-loop for i from 0 to 1500000
> >                           if (cl-oddp i)
> >                           collect 'a
> >                           else
> >                           collect 'b))

> > (defun elb-eq ()
> >   (let ((n 0))
> >     (dolist (l elb-list n)
> >       (when (eq 'b l)
> >         (cl-incf n)))))

> > (defun elb-eq-entry ()
> >   (dotimes (_ 1000)
> >     (elb-eq)))
> > #+END_SRC

> > Results:

> > b619777dd6 (baseline) 50.09s
> > accurate-warning-pos  51.28s

> > This is about 2% perf penalty.

> On my Ryzen, I'm seeing a 50% penalty.  :-(  (Admittedly that's
> comparing the year old branch to current master.  I suppose I should
> build the correct comparable revision and try again.)  This suggests
> that the branch prediction logic isn't present (or isn't active) on the
> Ryzen.

OK, I've done just that (with revision
b619777dd67e271d639c6fb1d031650af8fd79e6 from 2019-03-30) and I now see
what you see:
b619777:                      76.067s
scratch/accurate-warning-pos: 77.656s.
master:                       52.423s

So, clearly, optimisations to Emacs in the last year have borne fruit.
Maybe that optimisaton would be useful in s/a-w-p.

> > Interestingly with the __builtin_expect trick applied exec time gets
> > back to 50.65s.

> How do you do this?  I couldn't make much sense of the documentation of
> __builtin_expect.  :-(

I've read your patch in your other mail, and I will apply it and try it
out.

[ .... ]

> > Regards

> >   Andrea

> > --
> > address@hidden

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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