On Dec 9, 2008, at 10:37 PM, Sean McBride wrote:

Well, such things are never black and white, of course... but I just
wanted to add that caching the value increases your application's memory use (admittedly only slightly in the case being discussed). But in the
general case, by increasing memory use you:
- can fit less in the CPU's cache
- increase paging
- etc.

So it could actually lead to making your app slower!

Quite possible. Though I'd like to make a counter-point. :-) It's inexact but in the case of mobile devices (for Cocoa anyway), you have laptops that have hard disks but more RAM. You also have iPhones and iPod Touches that have less RAM but a solid state storage device. I tend toward leaning more on memory than on processor overhead and worry about optimizing from there if needed, but I admit that may be overly simplistic.

DISCLAIMER: None of this is meant to suggest you should go around spending any real time and effort optimizing without profiling first.

I'd love to see some direct comparisons between Apple products along these lines but a good test requires a good range of hardware and an iPhone developer membership.

--
I.S.


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to