Re: Add RISC-V Zbb popcount optimization

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Greg Burd <greg(at)burd(dot)me>, John Naylor <johncnaylorls(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add RISC-V Zbb popcount optimization
Date: 2026-03-23 15:09:30
Message-ID: acFXqnQBRCNIXkLC@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 22, 2026 at 02:01:50PM -0400, Andres Freund wrote:
> I'm also pretty doubtful all the effort to e.g. add AVX 512 popcount was spent
> all that effectively - hard to believe there's any real world workloads where
> that gain is worth the squeeze. At least for aarch64 and x86-64 there's real
> world use of those platforms, making niche-y perf improvements somewhat
> worthwhile. Whereas there's afaict not yet a whole lot of riscv production
> adoption.

That work was partially motivated by vector stuff that used popcount
functions pretty heavily, but yeah, the complexity compared to the gains is
the main reason I've been pushing to just use simd.h elsewhere (i.e., SSE2
and Neon). I'd still consider using AVX-512, etc. for things if the impact
on real-world workloads was huge, though.

--
nathan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-03-23 15:13:20 Re: Enable -Wstrict-prototypes and -Wold-style-definition by default
Previous Message Ashutosh Bapat 2026-03-23 15:00:10 Re: SQL Property Graph Queries (SQL/PGQ)