On Wed, Jul 31, 2024 at 12:50 PM Andres Freund <and...@anarazel.de> wrote: > It's one thing for the avx512 path to have that overhead, but it's > particularly absurd for pg_popcount32/pg_popcount64, where > > a) The function call overhead is a larger proportion of the cost. > b) the instruction is almost universally available, including in the > architecture baseline x86-64-v2, which several distros are using as the > x86-64 baseline.
FWIW, another recent thread about that: https://www.postgresql.org/message-id/flat/CA%2BhUKGKS64zJezV9y9mPcB-J0i%2BfLGiv3FAdwSH_3SCaVdrjyQ%40mail.gmail.com