Re: [PoC] Improve dead tuple storage for lazy vacuum - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: [PoC] Improve dead tuple storage for lazy vacuum
Date
Msg-id CAMT0RQSL5W3aVL9BFb4wLwzvwKbOtynw1r2MAGG8zOKtff3s1w@mail.gmail.com
Whole thread Raw
In response to Re: [PoC] Improve dead tuple storage for lazy vacuum  (John Naylor <john.naylor@enterprisedb.com>)
Responses Re: [PoC] Improve dead tuple storage for lazy vacuum
List pgsql-hackers
> Another thought: for non-x86 platforms, the SIMD nodes degenerate to
> "simple loop", and looping over up to 32 elements is not great
> (although possibly okay). We could do binary search, but that has bad
> branch prediction.

I am not sure that for relevant non-x86 platforms SIMD / vector
instructions would not be used (though it would be a good idea to
verify)
Do you know any modern platforms that do not have SIMD ?

I would definitely test before assuming binary search is better.

Often other approaches like counting search over such small vectors is
much better when the vector fits in cache (or even a cache line) and
you always visit all items as this will completely avoid branch
predictions and allows compiler to vectorize and / or unroll the loop
as needed.

Cheers
Hannu



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: JSON/SQL: jsonpath: incomprehensible error message
Next
From: Andres Freund
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum