pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Amonson, Paul D <paul.d.amonson@intel.com>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Shankaran, Akash <akash.shankaran@intel.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: Popcount optimization using AVX512
Date: Mon, 18 Mar 2024 11:20:18 -0500
Message-ID: <20240318162018.GA204772@nathanxps13> (raw)
In-Reply-To: <BL1PR11MB5304070E33F7DD0520445B77DC2D2@BL1PR11MB5304.namprd11.prod.outlook.com>
References: <BL1PR11MB530444AEE08A91242ABA1915DC222@BL1PR11MB5304.namprd11.prod.outlook.com>
	<20240307173318.GA455851@nathanxps13>
	<20240307213600.GA563369@nathanxps13>
	<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>

On Mon, Mar 18, 2024 at 04:07:40PM +0000, Amonson, Paul D wrote:
> Won't I still need the runtime checks? If I compile with a compiler
> supporting the HW "feature" but run on HW without that feature,  I will
> want to avoid faults due to illegal operations. Won't that also affect
> performance?

I don't think David was suggesting that we need to remove the runtime
checks for AVX512.  IIUC he was pointing out that most of the performance
gain is from removing the function call overhead, which your v8-0002 patch
already does for the proposed AVX512 code.  We can apply a similar
optimization for systems without AVX512 by inlining the code for
pg_popcount64() and pg_popcount32().

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





view thread (173+ messages)  latest in thread

Message-ID: <20240318162018.GA204772@nathanxps13>
Permalink:  ../20240318162018.GA204772@nathanxps13/
Also on:    postgresql.org/message-id/20240318162018.GA204772@nathanxps13

 · 

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: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, paul.d.amonson@intel.com, dgrowleyml@gmail.com, andres@anarazel.de, alvherre@alvh.no-ip.org, akash.shankaran@intel.com, noah@leadboat.com, tgl@sss.pgh.pa.us, boekewurm+postgres@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Popcount optimization using AVX512
  In-Reply-To: <20240318162018.GA204772@nathanxps13>

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

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