From: | Hannu Krosing <hannuk(at)google(dot)com> |
---|---|
To: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PoC] Improve dead tuple storage for lazy vacuum |
Date: | 2022-06-27 15:23:22 |
Message-ID: | CAMT0RQSL5W3aVL9BFb4wLwzvwKbOtynw1r2MAGG8zOKtff3s1w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-06-27 15:26:49 | Re: [PoC] Improve dead tuple storage for lazy vacuum |
Previous Message | Andrew Dunstan | 2022-06-27 15:15:57 | Re: JSON/SQL: jsonpath: incomprehensible error message |