[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Correct line/column numbers in byte compiler messages
From: |
Andrea Corallo |
Subject: |
Re: Correct line/column numbers in byte compiler messages |
Date: |
Sat, 21 Mar 2020 16:28:55 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Alan Mackenzie <address@hidden> writes:
> Hello, Andrea.
>
> On Sat, Mar 21, 2020 at 11:22:03 +0000, Andrea Corallo wrote:
>> The outcome as I see it is that total bootstrap time gets bigger 1.1x
>> while normal runtime appears not affected.
>
> Well, it looks like the normal runtime is around 2.x% slower for
> scratch/accurate-warning-pos.
Well I studied physics so for me 2% is pretty much zero :) :) Joking
apart I'm not sure this is really sufficient to conclude is noise or
not.
>> For my quick understanding of how it works this is expected. The
>> additional branch and compare against symbols_with_pos_enabled in `eq'
>> is a kind of branch that is very easily predictable by any modern CPU,
>> therefore when the feature is off (not compiling) it becomes transparent
>> (I'd see a compiler branch hit there too).
>
> In other words, the processor will test symbols_with_pos_enabled
> simultaneously with starting the continuation for the "not" case.
The processor will just speculate guessing the target branch without
having to wait for symbols_with_pos_enabled value to be loaded. Given
this change rarely, speculation there should be pretty much always
correct.
I'd wrap symbols_with_pos_enabled into something like:
#define SYMBOLS_WITH_POS_ENABLED \
__builtin_expect(symbols_with_pos_enabled, 0)
To make sure we minimize instruction cache overhead too.
> This extra test in the EQ code was always the main thing in the slowdown
> occurring in this git branch.
Is the EQ overhead the main/only one? Also GC seems marginally affected.
I think would be interesting to write a nano benchmark EQ focused to
test this accurately.
> When I timed things back in 2018, I got a slowdown of somewhat more than
> 2.x%. May I ask what sort of processor you're using? Mine (unchanged
> since then) is an AMD Ryzen.
I did the test on a "Xeon E5-1660 v3". I think we can classify it as a
good system from few (6?) years ago. Not very fast by today's standards
but still quite beefy in terms of caches.
Bests
Andrea
--
address@hidden
- Re: GNU is looking for Google Summer of Code Projects, (continued)
- Re: GNU is looking for Google Summer of Code Projects, Andrea Corallo, 2020/03/19
- Re: GNU is looking for Google Summer of Code Projects, Rocky Bernstein, 2020/03/19
- Re: GNU is looking for Google Summer of Code Projects, Stefan Monnier, 2020/03/19
- Re: GNU is looking for Google Summer of Code Projects, Andrea Corallo, 2020/03/19
- Re: GNU is looking for Google Summer of Code Projects, Rocky Bernstein, 2020/03/19
Correct line/column numbers in byte compiler messages [Was: GNU is looking for Google Summer of Code Projects], Alan Mackenzie, 2020/03/19
- Re: Correct line/column numbers in byte compiler messages [Was: GNU is looking for Google Summer of Code Projects], Andrea Corallo, 2020/03/19
- Re: Correct line/column numbers in byte compiler messages [Was: GNU is looking for Google Summer of Code Projects], Alan Mackenzie, 2020/03/20
- Re: Correct line/column numbers in byte compiler messages [Was: GNU is looking for Google Summer of Code Projects], Andrea Corallo, 2020/03/21
- Re: Correct line/column numbers in byte compiler messages, Alan Mackenzie, 2020/03/21
- Re: Correct line/column numbers in byte compiler messages,
Andrea Corallo <=
- Re: Correct line/column numbers in byte compiler messages, Andrea Corallo, 2020/03/21
- Re: Correct line/column numbers in byte compiler messages, Alan Mackenzie, 2020/03/21
- Re: Correct line/column numbers in byte compiler messages, Andrea Corallo, 2020/03/21
- Re: Correct line/column numbers in byte compiler messages, Andrea Corallo, 2020/03/21
Re: Correct line/column numbers in byte compiler messages, Alan Mackenzie, 2020/03/22
Re: Correct line/column numbers in byte compiler messages [Was: GNU is looking for Google Summer of Code Projects], Rocky Bernstein, 2020/03/19
Re: Correct line/column numbers in byte compiler messages [Was: GNU is looking for Google Summer of Code Projects], Stefan Monnier, 2020/03/19
Re: Correct line/column numbers in byte compiler messages [Was: GNU is looking for Google Summer of Code Projects], Alan Mackenzie, 2020/03/20
Re: Correct line/column numbers in byte compiler messages [Was: GNU is looking for Google Summer of Code Projects], Stefan Monnier, 2020/03/19
Re: Correct line/column numbers in byte compiler messages [Was: GNU is looking for Google Summer of Code Projects], Stefan Monnier, 2020/03/19