Re: Change GUC hashtable to use simplehash?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Junwang Zhao <zhjwpku(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gurjeet Singh <gurjeet(at)singh(dot)im>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Change GUC hashtable to use simplehash?
Date: 2024-01-20 00:13:18
Message-ID: 09924cd6c49935d5e9bba5cd40bec28c605d7c2e.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2024-01-19 at 13:38 -0800, Jeff Davis wrote:
> One post-commit question on 0aba255440: why do
> haszero64(pg_bswap64(chunk)) rather than just haszero64(chunk)? How
> does byteswapping affect whether a zero byte exists or not?

I missed that it was used later when finding the rightmost one
position.

The placement of the comment was slightly confusing. Is:

haszero64(pg_bswap64(chunk)) == pg_bswap64(haszero64(chunk))

? If so, perhaps we can do the byte swapping outside of the loop, which
might save a few cycles on longer strings and would be more readable.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2024-01-20 01:47:57 Re: Improve WALRead() to suck data directly from WAL buffers when possible
Previous Message Daniel Gustafsson 2024-01-20 00:03:24 Re: Oom on temp (un-analyzed table caused by JIT) V16.1 [Fixed Already]