Using properties significantly increased the size of my executable file. If I had something like this:
float a = [self foo: self.scale]; float b = [self bar: self.scale]; I could cut down the size of my code quite a bit by caching the return value of self.scale: float theScale = self.scale; float a = [self foo: theScale]; float b = [self bar: theScale]; Now just removing one of two getter calls by caching its result won't have that much effect on binary size, but the other night I went through my code to do the exhaustively. The size decrease was quite significant. Using properties when a simple iVar would do is not justified. One wants to use properties only when the generated code significantly reduces the amount of work one has to do as a coder, for example by automagically taking care of retain counts. Calling accessors is also quite slow compared to a direct iVar access, because it has to go through Objective-C's message dispatch mechanism. Focussing on interface is no excuse for weighty, bloated code! -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.com quix...@dulcineatech.com _______________________________________________ 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 arch...@mail-archive.com