[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic
From: |
Thomas Dickey |
Subject: |
Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic |
Date: |
Sat, 29 Dec 2018 06:45:53 -0500 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Dec 28, 2018 at 11:05:20AM -0600, Bryan Christ wrote:
> Thomas,
>
> Here's another callgrind log. This one is from Bionic with the default
> callback
> installed (the wrapper for pair_content). You can see that pair_content()
> does show
> up, but it's several times less impactful than the same scenario on F29.
thanks. I see that you also checked in the code which calls pair_content,
and will make a benchmark to help with the discussion. I can see some
area for improvement in ncurses (benchmark will show how much), but the
linear lookup of color pairs which you're doing is the main problem:
a) if a pair is not initialized, you don't get much benefit from
asking about it, since it has predefined (useless..) content.
b) linear searches are _slow_, even for 512 elements.
Since your emulator captures all of the color information, it probably
would be better to limit the loop to the number of pairs actually
used, as well as to use tsearch to lookup the color information (using
your own cache).
I'll followup once I've done the benchmark/improvements.
--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: Digital signature
- API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Bryan Christ, 2018/12/27
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Thomas Dickey, 2018/12/27
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Bryan Christ, 2018/12/27
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Thomas Dickey, 2018/12/27
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Pavel Stehule, 2018/12/28
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Thomas Dickey, 2018/12/28
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Pavel Stehule, 2018/12/28
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Bryan Christ, 2018/12/28
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic,
Thomas Dickey <=
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Bryan Christ, 2018/12/29
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Thomas Dickey, 2018/12/29
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Bryan Christ, 2018/12/30
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Thomas Dickey, 2018/12/30
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Bryan Christ, 2018/12/28
- Re: API pair_content() call is about 7x slower on Fedora 29 vs Bionic, Bryan Christ, 2018/12/28