Re: faster version of AllocSetFreeIndex for x86 architecture

Поиск
Список
Период
Сортировка
От Jeremy Kerr
Тема Re: faster version of AllocSetFreeIndex for x86 architecture
Дата
Msg-id 200906030139.52998.jk@ozlabs.org
обсуждение исходный текст
Ответ на faster version of AllocSetFreeIndex for x86 architecture  (Atsushi Ogawa <a_ogawa@hi-ho.ne.jp>)
Ответы [PATCH 1/2] Add bit operations util header  (Jeremy Kerr <jk@ozlabs.org>)
[PATCH 2/2] Use fls() to find chunk set  (Jeremy Kerr <jk@ozlabs.org>)
Список pgsql-hackers
Hi,

> I made a faster version of AllocSetFreeIndex for x86 architecture.

Neat, I have a version for PowerPC too.

In order to prevent writing multiple copies of AllocSetFreeIndex, I 
propose that we add a fls() function ("find last set"); this can be 
defined in an architecture-independent manner (ie, shift mask & test in 
a loop), and re-defined for arches that have faster ways of doing the 
same (ie, cntlz instruction on powerpc).

We can then change AllocSetFreeIndex to use fls().

Patches coming...



Jeremy


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

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: PostgreSQL Developer meeting minutes up
Следующее
От: Tom Lane
Дата:
Сообщение: Managing multiple branches in git