On Jul 5, 2012, at 9:38 AM, Jens Alfke wrote:

> And the real point in this discussion: Just like with VM but on a smaller 
> scale, the better your working set of data fits into the CPU cache, the 
> faster your code will run. And the cache will, obviously, hold twice as many 
> int32_t's as it will NSIntegers (in 64-bit mode.) So using smaller int sizes 
> _can_ improve performance.

Yes, it definitely can. For any application that is dealing with large blocks 
of data. And if you're working with the vector unit, it's even more important. 
In theory, that could happen without your knowing it via framework calls--in 
practice it seems likely that you'd know if you're working with larges blocks 
of data and algorithms that should be handled that way...

And theoretically, moving from 32-bit to 64-bit executable could slow you down 
because of fewer pointers fitting in cache--however the few people I've ever 
heard mention that were, in my opinion, seriously overblowing it. In my 
experience with data & algorithm heavy code, just switching from 32- to 64-bit 
produces about a 10% performance boost, because of the advantages of x86-64 
(more registers and so on).

(Not that it matters anymore, but this is different than the PPC case, where 
there were not such instruction model differences between 32 & 64).


-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to