Re: Fix bank selection logic in SLRU

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Fix bank selection logic in SLRU
Date: 2024-12-19 10:10:09
Message-ID: CA2D0CC8-D2F3-42F8-AF32-8FB30D1FC93A@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 19 Dec 2024, at 15:01, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2024-12-19 10:17:12 Re: New "single" COPY format
Previous Message Yura Sokolov 2024-12-19 10:01:07 Re: Fix bank selection logic in SLRU