Re: Spinlock backoff algorithm

Поиск
Список
Период
Сортировка
От Steve Atkins
Тема Re: Spinlock backoff algorithm
Дата
Msg-id 78E5748A-C1A0-4C3A-9CC6-AC5B34E1AEDD@blighty.com
обсуждение исходный текст
Ответ на Re: Spinlock backoff algorithm  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
On Nov 14, 2007, at 6:57 PM, Josh Berkus wrote:

> Tom,
>
>> I've got one upstairs (HPPA), and I believe that it's actually a  
>> pretty
>> common situation in scientifically-oriented workstations from a few
>> years back.
>
> Last I checked, scientific workstations aren't exactly a common  
> platform for
> PostgreSQL servers.
>
> 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?

Somewhat. The last version of K7 I looked at had three integer  
execution units versus one floating point unit.

They're also scheduled fairly independently, meaning that casts from  
double to integer or back again will have some minor negative effects  
on the pipeline or the scheduler more than the use of floating point  
itself.

In the grand scheme of things, though, I don't believe it's a big  
deal for typical code on most modern desktop CPUs, certainly not  
compared to memory starvation, use of less than optimal compilers and  
all the other reasons the pipeline might stall. I might care in the  
innermost of inner loops, but possibly not even then unless a  
profiler told me differently.

Cheers,  Steve



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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Spinlock backoff algorithm
Следующее
От: "Gregory Maxwell"
Дата:
Сообщение: Re: Spinlock backoff algorithm