Re: hash_create API changes (was Re: speedup tidbitmap patch: hash BlockNumber)

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: hash_create API changes (was Re: speedup tidbitmap patch: hash BlockNumber)
Дата
Msg-id 20141225110757.GD31801@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: hash_create API changes (was Re: speedup tidbitmap patch: hash BlockNumber)  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-hackers
On 2014-12-24 13:58:41 -0600, Jim Nasby wrote:
> This surprises me given that SMHasher shows XXH to be 50% faster than Spooky for 20 byte keys.

Note that there's quite some differences in how smhasher and postgres
use the hash functions. The former nearly exclusively exercises the hash
function while postgres also executes a lot of other code. Which means
that the instruction cache and branch prediction is much less likely to
contain relevant entries. And that can change the performance
characteristics noticeably. Additionally there's differences in how much
pipelining can be employed - the likelihood the CPU is able to do so in
tight loops is much higher.

Also note that in many cases in which you can see tag_hash/hash_any in
workloads a part of the cost won't actually be the computation of the
hashes themselves but the cache misses triggered by the hash computation
accessing the data.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Moving RestoreBlockImage from xlogreader.c to xlogutils.c