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
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster