@gte My beef with people that don't grasp systems programming if they can't imagine how small optimizations in many APIs quickly add up!
@mjtsai And many of the older classes (NSMenu, NSView, NSWindow, et cetera) have ivars no longer in use.
-
-
@mjtsai In fact, NSWindow got so insane that a new class, NSWindowAuxiliary, was created to hold the additional ivars. -
@mjtsai As NSWindowAuxilary isn't public, Apple can add and remove ivars as needed without having the fragile base class problem. -
@rosyna So why are they still using it now that we have Objective-C 2? - View other replies
-
@mjtsai As long as the 32-bit i386 runtime exists, they can't dump the ivars from the headers, sadly. -
@rosyna So, again, this is not (yet) an actual performance improvement resulting from Objective-C 2. -
@mjtsai While NSWindow may have been good to show the pain of fragile base classes, it may have been bad for an optimization example -
@mjtsai a better example would be NSStringDrawing, all the Gesture Recognizer classes, NSIndexPath, various NSCollectionView classes - View other replies
-
@rosyna Interesting that they added hash ivar for NSIndexPath. NSStringDrawing is a category so not sure what you are referring to there. - Show more
-
-
@rosyna I kind of doubt removing old ivars from view classes makes up for slowing down every ivar access with extra indirection. -
@rosyna Non-fragile is great for other reasons, but if we're talking about optimization…
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Rosyna Keller
Marcel Weiher
Michael Tsai