Re: use SIMD in GetPrivateRefCountEntry()

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Yura Sokolov <y.sokolov@postgrespro.ru>, Nathan Bossart <nathandbossart@gmail.com>
Cc: Peter Geoghegan <pg@bowt.ie>, Tomas Vondra <tomas@vondra.me>, Thomas Munro <thomas.munro@gmail.com>, Nazir Bilal Yavuz <byavuz81@gmail.com>, Robert Haas <robertmhaas@gmail.com>, Melanie Plageman <melanieplageman@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Georgios <gkokolatos@protonmail.com>, Konstantin Knizhnik <knizhnik@garret.ru>, Dilip Kumar <dilipbalaut@gmail.com>
Date: 2025-10-24T13:16:28Z
Lists: pgsql-hackers
Hi, 

On October 24, 2025 3:43:34 PM GMT+03:00, Yura Sokolov <y.sokolov@postgrespro.ru> wrote:
>03.10.2025 23:51, Nathan Bossart пишет:
>> Sorry for the noise.  I fixed x86-64 builds in v2.
>>
>
>Why not just use simplehash for private ref counts?
>Without separation on array and overflow parts.
>Just single damn simple hash table.

It's to expensive for common access patterns in my benchmarks. Buffer accesses are very very very common and hash tables have no spatial locality.

Andres 
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.