On Thu, Apr 07, 2005 at 11:12:13PM +0200, Ketil Froyn wrote:
> Thanks for the responses. I guess one major limiting factor could be the
> types used internally by the GIMP. For instance, if it does operations on
> uint32 type variables internally, I'd think the compiler needs to be
> pretty clever to make use of 64 bit operations. But now I'm getting into
> deep waters here here...:) I was hoping someone in the know could confirm
> whether there's any point going to 64 bit to make the GIMP faster, rather
> than just getting a faster 32 bit CPU.

As mentioned in other parts of this thread, amd64 processors have twice
the amount of general purpose registers, which means gcc can generate
more efficient code. It also uses sse and sse2 instructions for floating
point code, which is a big performance win over x87. But neither of
these are anything 64-bit specific, and *all* applications will benefit
without doing anything special.

The only 64-bit specific thing that GIMP will benefit from is if you
have > 4 GB of memory and you're dealing with very large images. Since
it can address that much memory directly, the image can be loaded
entirely into RAM without any disk swapping.

You have a misconception that using 64-bits for everything internally
will magically make things faster. In reality, this would make things
slower, since data units will be 8 bytes vs. 4 bytes, which means you're
using up more memory bandwidth and precious cache space. If your app
only needs 32 bits of precision, then it's a waste of space and a waste
of time to shuffle the extra bits back and forth.

Probably for this reason, amd64 has a default operand size of 32 bits,
even in 64-bit mode. As a result, code size isn't siginificantly larger
than x86 (you take a hit on the wider pointers, but that's offset by the
doubling of the registers; gcc can do more with less code).

So there isn't much in GIMP that needs 64 bit integers, especially not
in performance critical sections. There's the mmx, sse, sse2
acceleration for some functions, but those use 64-bit and 128-bit stuff
on both x86 and amd64.

To summarize, an amd64 platform will give you better performance over an
x86 platform, but mainly to due other aspects of its design, and not
much to do with 64-bit wide integer operations.

Gimp-user mailing list

Reply via email to