Re: call popcount32/64 directly on non-x86 platforms

From: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>
Subject: Re: call popcount32/64 directly on non-x86 platforms
Date: 2021-08-12 17:54:25
Message-ID: CAFBsxsGX48JVBTggHoFWvAXJbBbRZANEqXyP+3kH+dw960BViA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 12, 2021 at 1:26 AM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> Closer, but I don't see why there's any need to make the fast and slow
> functions external. It should be perfectly fine to keep them static.
>
> I didn't test the performance, but the attached works for me.

Thanks for that! I still get a big improvement to on Power8 / gcc 4.8, but
it's not quite as fast as earlier versions, which were around 200ms:

master: 646ms
v3: 312ms

This machine does seem to be pickier about code layout than any other I've
tried running benchmarks on, but that's still a bit much. In any case, your
version is clearer and has the intended effect, so I plan to commit that,
barring other comments.

I think I'll leave my v2-0002 aside for now, since it has wider
implications, and I have bigger things to work on.

--
John Naylor
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2021-08-12 18:16:25 Re: badly calculated width of emoji in psql
Previous Message Michael Meskes 2021-08-12 17:21:01 Re: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE