Re: Bug in huge simplehash - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Bug in huge simplehash
Date
Msg-id 20210813121431.bykwkdmttbwulqib@alap3.anarazel.de
Whole thread Raw
In response to Re: Bug in huge simplehash  (Yura Sokolov <y.sokolov@postgrespro.ru>)
List pgsql-hackers
On 2021-08-13 14:40:08 +0300, Yura Sokolov wrote:
> Ranier Vilela писал 2021-08-13 14:12:
> > Em sex., 13 de ago. de 2021 às 07:15, Andres Freund
> > <andres@anarazel.de> escreveu:
> > > Personally I find it more obvious to understand the intended
> > > behaviour
> > > with ~0 (i.e. all bits set) than with a width truncation.
> > 
> > https://godbolt.org/z/57WcjKqMj
> > The generated code is identical.
> 
> I believe, you mean https://godbolt.org/z/qWzE1ePTE

I don't think the choice of instructions matters. This is called around
creation and resizing - the other costs are several orders of magnitude
more expensive than determining the mask.



pgsql-hackers by date:

Previous
From: Marek Szuba
Date:
Subject: [PATCH] Native spinlock support on RISC-V
Next
From: Julien Rouhaud
Date:
Subject: Re: Shared memory size computation oversight?