Re: define pg_structiszero(addr, s, r)
От | Bertrand Drouvot |
---|---|
Тема | Re: define pg_structiszero(addr, s, r) |
Дата | |
Msg-id | ZytVlmPJSRzmu5nS@ip-10-97-1-34.eu-west-3.compute.internal обсуждение исходный текст |
Ответ на | Re: define pg_structiszero(addr, s, r) (Ranier Vilela <ranier.vf@gmail.com>) |
Ответы |
Re: define pg_structiszero(addr, s, r)
|
Список | pgsql-hackers |
Hi, On Wed, Nov 06, 2024 at 01:44:58PM +0900, Michael Paquier wrote: > Should the last loop check only 1 byte at a time or should this stuff > include one more step before the last one you wrote to do a couple of > checks with size_t? That may matter for areas small enough (len < > sizeof(size_t) * 8) causing the second step to not be taken, but large > enough (len > sizeof(size_t)) to apply a couple of size_t checks per > loop. Do you mean add: " for (; p < aligned_end; p += sizeof(size_t)) { if (*(size_t *)p != 0) return false; } " just before the last loop? If so, I did a few tests and did not see any major improvements. So, I thought it's simpler to not add more code in this inline function in v7 shared up-thread. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления: