Re: use ARM intrinsics in pg_lfind32() where available

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: use ARM intrinsics in pg_lfind32() where available
Date: 2022-08-27 22:15:02
Message-ID: 20220827221502.GB15951@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 27, 2022 at 05:18:34PM -0400, Tom Lane wrote:
> In short, I think the critical part of 0002 needs to look more like
> this:
>
> +#elif defined(__aarch64__) && defined(__ARM_NEON)
> +/*
> + * We use the Neon instructions if the compiler provides access to them
> + * (as indicated by __ARM_NEON) and we are on aarch64. While Neon support is
> + * technically optional for aarch64, it appears that all available 64-bit
> + * hardware does have it. Neon exists in some 32-bit hardware too, but
> + * we could not realistically use it there without a run-time check,
> + * which seems not worth the trouble for now.
> + */
> +#include <arm_neon.h>
> +#define USE_NEON
> ...

Thank you for the analysis! I'll do it this way in the next patch set.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-08-27 22:39:09 Re: use ARM intrinsics in pg_lfind32() where available
Previous Message Nathan Bossart 2022-08-27 22:12:34 Re: use ARM intrinsics in pg_lfind32() where available