Re: Spinlock backoff algorithm

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Spinlock backoff algorithm
Дата
Msg-id 20071116084542.GB31271@svana.org
обсуждение исходный текст
Ответ на Re: Spinlock backoff algorithm  (Josh Berkus <josh@agliodbs.com>)
Ответы Off-Topic: Float point division academia? (was: Re: Spinlock backoff algorithm)  (Mark Mielke <mark@mark.mielke.cc>)
Список pgsql-hackers
On Wed, Nov 14, 2007 at 06:57:18PM -0800, Josh Berkus wrote:
> The question is, for our most common platforms (like AMD and Intel) is the FPU
> notably slower/more contended than integer division?  I'd the impression that
> it was, but my knowledge of chip architectures is liable to be out of date.
>
> Can we have a hardware geek speak up?

I did some searching and the best figures I can find for integer
division is 15-40 cycles whereas for floating point the best I found was 5
cycles. The FP units on modern processer as very highly optimsed, but
the figures quoted are for pipelined division, which is not what we're
doing here.

http://www.behardware.com/art/imprimer/623/

I did find a thread about how integer division on the Itanium was
implemented by copying the integers to the FP registers, doing the
division and rounding there and copying back. So at least there it's
not true.

http://gcc.gnu.org/ml/gcc-patches/2005-12/msg01518.html

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [COMMITTERS] pgsql: update files for beta3
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Javascript support in the backend, i.e. PL/JS