public inbox for [email protected]  
help / color / mirror / Atom feed
From: Nathan Bossart <[email protected]>
To: John Naylor <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: [email protected]
Subject: Re: refactor architecture-specific popcount code
Date: Thu, 29 Jan 2026 11:06:03 -0600
Message-ID: <aXuTex5a4iu-BYXy@nathan> (raw)
In-Reply-To: <CANWCAZacr4AqrFzQRhhwQGwV1xSaUWyEYnYOT9SFc3cJFUWV6g@mail.gmail.com>
References: <[email protected]>
	<aWkQ8AB9WlWVEEfe@nathan>
	<[email protected]>
	<aWk65qnA-wD0dOjp@nathan>
	<CANWCAZaPMn0Xgy7nav_JxOLW-3RsZpd6c9Ad7KFCD4CrEirCkQ@mail.gmail.com>
	<aXE117d0gWDwlPdA@nathan>
	<CANWCAZY7R+iy+r9YM_sySNydHzNqUirx1xk0tB3ej5HO62GdgQ@mail.gmail.com>
	<aXJjbkp2_glyfy6z@nathan>
	<aXeLLydy1lxMwcCv@nathan>
	<CANWCAZacr4AqrFzQRhhwQGwV1xSaUWyEYnYOT9SFc3cJFUWV6g@mail.gmail.com>

On Thu, Jan 29, 2026 at 06:31:53PM +0700, John Naylor wrote:
> On Mon, Jan 26, 2026 at 10:41 PM Nathan Bossart
> <[email protected]> wrote:
>> I added a 0003 that swaps that final popcount with pg_popcount().
> 
> I'm not sure either if this part matters much, but it makes more sense
> to me to continue using single word functions for that last part.
> Since they have very few call sites anymore, we can make them inline
> without bloating the binary on x86.

Okay, I abandoned that patch.

> Right, just the portable ones. Here, too, inlining them everywhere
> would mitigate any impact.

Done.

> +static inline int
> +pg_popcount64_neon(uint64 word)
> 
> ...if they were inlined from the header, I think we wouldn't need this
> separate neon function in this file at all. Currently, we rely on
> __builtin_popcountl for the portable function outside this file. We
> could either keep using that or switch to neon if there's a
> portability difference.

Done.

-- 
nathan


view thread (5+ 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]
  Subject: Re: refactor architecture-specific popcount code
  In-Reply-To: <aXuTex5a4iu-BYXy@nathan>

* 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