Re: add AVX2 support to simd.h

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Ants Aasma <ants(at)cybertec(dot)at>
Cc: John Naylor <johncnaylorls(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: add AVX2 support to simd.h
Date: 2024-01-09 14:03:39
Message-ID: e1d5fe8e-d374-49cc-8295-a544692a916e@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29.11.23 18:15, Nathan Bossart wrote:
> Using the same benchmark as we did for the SSE2 linear searches in
> XidInMVCCSnapshot() (commit 37a6e5d) [1] [2], I see the following:
>
> writers sse2 avx2 %
> 256 1195 1188 -1
> 512 928 1054 +14
> 1024 633 716 +13
> 2048 332 420 +27
> 4096 162 203 +25
> 8192 162 182 +12

AFAICT, your patch merely provides an alternative AVX2 implementation
for where currently SSE2 is supported, but it doesn't provide any new
API calls or new functionality. One might naively expect that these are
just two different ways to call the underlying primitives in the CPU, so
these performance improvements are surprising to me. Or do the CPUs
actually have completely separate machinery for SSE2 and AVX2, and just
using the latter to do the same thing is faster?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2024-01-09 14:10:33 Re: partitioning and identity column
Previous Message Nazir Bilal Yavuz 2024-01-09 13:22:49 Re: make pg_ctl more friendly