Re: Speeding Up Bitmapset

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Speeding Up Bitmapset
Date: 2023-06-26 02:38:43
Message-ID: CAApHDvoTsquPomNNuFCKBcVNEjZ3MPZTO9DKqQOcaN+t=-NXWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 26 Jun 2023 at 12:55, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> wrote:
> Have you seen bms_compare?
> For some reason someone thought it would be better to loop backward the array.

That's nothing to do with efficiency. It's related to behaviour. Have
a look at the function's header comment, it's trying to find the set
with the highest value member. It wouldn't make much sense to start
at the lowest-order words for that.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2023-06-26 03:18:37 Re: POC, WIP: OR-clause support for indexes
Previous Message Alena Rybakina 2023-06-26 02:38:14 Re: POC, WIP: OR-clause support for indexes