On Mon, Dec 11, 2006 at 09:05:56AM -0200, Daniel van Ham Colchete wrote:
> But, trust me on this one. It's worth it.
You know what? I don't.
> Think of this: PostgreSQL and GNU LibC use a lot of complex algorithms:
> btree, hashes, checksums, strings functions, etc... And you have a lot of
> ways to compile it into binary code. Now you have Pentium4's vectorization
> that allow you to run plenty of instructions in paralell, but AMD doesn't
> have this. Intel also have SSE2 that makes double-precision floatpoint
> operations a lot faster, AMD also doesn't have this (at least on 32bits).
Athlon 64 has SSE2, also in 32-bit-mode.
Of course, it doesn't really matter, since at the instant you hit the disk
even once, it's going to take a million cycles and any advantage you got from
saving single cycles is irrelevant.
> Imagine that you are GCC and that you have two options in front of
> you: you can use FSQRT or FDIV plus 20 ADD/SUB.
Could you please describe a reasonable case where GCC would have such an
option? I cannot imagine any.
> An example that I know of: it's impossible to run my software at a
> high demanding customer without compiling it to the it's processor (I
> make 5 compilations on every release).
What's "your software"? How can you make such assertions without backing them
up? How can you know that the same holds for PostgreSQL?
As Mike said, point to the benchmarks showing this "essential" difference
between -O2 and -O2 -mcpu=pentium4 (or whatever). The only single worthwhile
difference I can think of, is that glibc can use the SYSENTER function if it
knows you have a 686 or higher (which includes AMD), and with recent kernels,
I'm not even sure if that is needed anymore.
/* Steinar */
--
Homepage: http://www.sesse.net/