make BufferGetBlockNumber() a macro

Поиск
Список
Период
Сортировка
От Neil Conway
Тема make BufferGetBlockNumber() a macro
Дата
Msg-id 20020401161353.6f33cfda.nconway@klamath.dyndns.org
обсуждение исходный текст
Ответы Re: make BufferGetBlockNumber() a macro  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
The attached patch re-implements BufferGetBlockNumber() as a macro,
for performance reasons. It also adds an assertion that should probably
be present.

I ran into this while profiling the hash index creation code (and
trying to determine why it's so slow). I noticed that this simple
function was being called about 2,500,000 times while creating a hash
index on a reasonably sized table (225,000 rows). By implementing this
as a macro, the performance of hash index creation improves by 8% (in
a totally unscientific and probably unreliable benchmark).

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

Вложения

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: ALTER TABLE ... RENAME: minor stuff
Следующее
От: Tom Lane
Дата:
Сообщение: Re: make BufferGetBlockNumber() a macro