[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tooltips GC overhead
From: |
Nix |
Subject: |
Re: Tooltips GC overhead |
Date: |
Sat, 08 Aug 2015 14:41:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
On 4 Aug 2015, Stefan Monnier told this:
>>> The problem is that it would slow down functions like `cons'.
>> I don't see why it has to.
>
> I don't see how it wouldn't have to ;-)
>
>> And we could do that only when the memory profiler is invoked.
>
> AFAICT it would require an extra test somewhere in Fcons, and that
> test will always have to be performed.
The cost you're trying to defend against here is a mispredicted branch
and corresponding pipeline stall, so if you mark it with
__builtin_expect() (or analogue in other compilers) you can make the
'profiler off' case the predicted branch, and its cost when off should
drop to nearly zero.
(Or so it seems to me.)
--
NULL && (void)
- Re: Tooltips GC overhead, (continued)
- Re: Tooltips GC overhead, Eli Zaretskii, 2015/08/04
- Re: Tooltips GC overhead, Stefan Monnier, 2015/08/07
- Re: Tooltips GC overhead, Eli Zaretskii, 2015/08/07
- Re: Tooltips GC overhead, Stefan Monnier, 2015/08/07
- Re: Tooltips GC overhead, Eli Zaretskii, 2015/08/07
- Re: Tooltips GC overhead, Stefan Monnier, 2015/08/07
- Re: Tooltips GC overhead, Eli Zaretskii, 2015/08/08
- Re: Tooltips GC overhead, David Kastrup, 2015/08/08
- Re: Tooltips GC overhead, Paul Eggert, 2015/08/07
- Re: Tooltips GC overhead, Eli Zaretskii, 2015/08/07
- Re: Tooltips GC overhead,
Nix <=
- Re: Tooltips GC overhead, Stefan Monnier, 2015/08/08
- Re: Tooltips GC overhead, David Kastrup, 2015/08/08
- Re: Tooltips GC overhead, Nix, 2015/08/10
- Re: Tooltips GC overhead, David Kastrup, 2015/08/10