[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compatibility breakage involved in upgrading to the MacOS-X 10.5 API
From: |
Jens Ayton |
Subject: |
Re: Compatibility breakage involved in upgrading to the MacOS-X 10.5 API |
Date: |
Sun, 22 Feb 2009 16:59:39 +0100 |
On Feb 22, 2009, at 13:50, David Chisnall wrote:
I suspect the bigger problem will be the CGFloat type, which is now
used all over Cocoa. I really don't understand the reason for this
change. It's float on 32-bit and 64-bit on 64-bit platforms, which
almost sounds sensible until you remember that 32-bit and 64-bit
floats are both computed using the 80-bit x87 unit on 32-bit x86 and
so are the same speed, but are computed with the SSE unit on x86-64
and so calculations on doubles are often slower than the equivalent
calculations on floats. If anything, the opposite definitions would
make more sense for the architectures that Apple supports
(especially since most GPUs still can't handle doubles sensibly, and
a lot of the geometry calculations that use these types will
probably end up being offloaded to the GPU in future versions).
Actually, the default for OS X programs is to use SSE in 32-bit builds
as well.
Changing to 64-bit types is bad for performance in general, not just
for floating-point values. Increased flexibility is generally felt to
be worth it. I suspect the relevant people felt it would be short-
sighted not to take advantage of this ABI change to switch to doubles
just because of minor limitations of current hardware; after all, the
128-bit transition won't happen for another four or five decades,
while double-capable GPUs could easily be widespread in four or five
years.
--
Jens Ayton