public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: David Rowley <[email protected]>
Cc: Amonson, Paul D <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Shankaran, Akash <[email protected]>
Cc: Noah Misch <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Matthias van de Meent <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Popcount optimization using AVX512
Date: Mon, 18 Mar 2024 16:08:10 -0500
Message-ID: <20240318210810.GA582529@nathanxps13> (raw)
In-Reply-To: <CAApHDvqyMNGVgwpaOPtENdq5uEMR=vSkRJEgG1S+X7Vtk1-EnA@mail.gmail.com>
References: <BL1PR11MB5304165E7A81E0107E70B069DC242@BL1PR11MB5304.namprd11.prod.outlook.com>
	<20240312013436.GA1787866@nathanxps13>
	<BL1PR11MB53042473B7B53B96E43648A7DC292@BL1PR11MB5304.namprd11.prod.outlook.com>
	<20240315150611.GA3495582@nathanxps13>
	<CAApHDvrb7MJRB6JuKLDEY2x_LKdFHwVbogpjZBCX547i5+rXOQ@mail.gmail.com>
	<20240318152902.GA2850@nathanxps13>
	<BL1PR11MB5304070E33F7DD0520445B77DC2D2@BL1PR11MB5304.namprd11.prod.outlook.com>
	<20240318162018.GA204772@nathanxps13>
	<20240318173004.GA361138@nathanxps13>
	<CAApHDvqyMNGVgwpaOPtENdq5uEMR=vSkRJEgG1S+X7Vtk1-EnA@mail.gmail.com>

On Tue, Mar 19, 2024 at 10:02:18AM +1300, David Rowley wrote:
> I looked at your latest patch and tried out the performance on a Zen4
> running windows and a Zen2 running on Linux. As follows:

Thanks for taking a look.

> The only thing I'd question in the patch is in pg_popcount_fast(). It
> looks like you've opted to not do the 32-bit processing on 32-bit
> machines. I think that's likely still worth coding in a similar way to
> how pg_popcount_slow() works. i.e. use "#if SIZEOF_VOID_P >= 8".
> Probably one day we'll remove that code, but it seems strange to have
> pg_popcount_slow() do it and not pg_popcount_fast().

The only reason I left it out was because I couldn't convince myself that
it wasn't dead code, given we assume that popcntq is available in
pg_popcount64_fast() today.  But I don't see any harm in adding that just
in case.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com






view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Popcount optimization using AVX512
  In-Reply-To: <20240318210810.GA582529@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox