Re: speedup tidbitmap patch: hash BlockNumber

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: speedup tidbitmap patch: hash BlockNumber
Дата
Msg-id 22082.1418655665@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: speedup tidbitmap patch: hash BlockNumber  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: speedup tidbitmap patch: hash BlockNumber  (Teodor Sigaev <teodor@sigaev.ru>)
Список pgsql-hackers
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 10/22/2014 04:14 PM, Teodor Sigaev wrote:
>> Just replace tag_hash in tidbitmap which uses hash_any to direct call of
>> hash_uint32, it saves ~5% of execution time.

> I'd suggest putting the new function in hashfn.c, where we already have 
> similar functions, string_hash, tag_hash, oid_hash and bitmap_hash. And 
> name it "blocknumber_hash", for consistency.

I think this suggestion is misguided, and the patch itself needs
rethinking.  Instead of doing this, let's hack dynahash.c itself
to substitute a shim like this when it's told function == tag_hash and
keysize == sizeof(uint32).  Then we can remove any similar shims that
already exist, and possibly end up with a net savings of code rather than
adding more.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Minor binary-search int overflow in timezone code
Следующее
От: Tom Lane
Дата:
Сообщение: Something is broken in logical decoding with CLOBBER_CACHE_ALWAYS