Re: Fix bank selection logic in SLRU - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Fix bank selection logic in SLRU
Date
Msg-id CA2D0CC8-D2F3-42F8-AF32-8FB30D1FC93A@yandex-team.ru
Whole thread Raw
In response to Re: Fix bank selection logic in SLRU  (Yura Sokolov <y.sokolov@postgrespro.ru>)
Responses Re: Fix bank selection logic in SLRU
List pgsql-hackers

> On 19 Dec 2024, at 15:01, Yura Sokolov <y.sokolov@postgrespro.ru> wrote:
>
> - `&` takes 0.69ns
> - `mult-rec` takes 2.94ns
> - `%` takes 3.24ns.

Thanks, Yura, for benchmarks and off-list conversation.
I’ve reproduced similar numbers on my Apple M2.
I agree that additional 3-4ns are negligible in case of SLRU access.



+    bits16        nbanks;

Perhaps, it’s not bits anymore. Also, is 64K banks ought enough for everybody?


Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Yura Sokolov
Date:
Subject: Re: Fix bank selection logic in SLRU
Next
From: "Joel Jacobson"
Date:
Subject: Re: New "single" COPY format