Two problems: One, many call sites really want a two-entry cache (mutable and non-mutable class, for example). Two, it costs too much dirty memory to do this everywhere so you need some way to choose at compile time where to apply it.
I suspect it’d help quite a bit for the long tail of apps that aren’t carefully profiled. I see IMP caching brought up a lot, but I rarely see it actually done. objc_msgSend is a “peanut butter cost” that’s smeared over all the code. Exactly the kind of thing optzns are good at.
-
-
Well Swift is trying to address that by letting you use the same abstractions for cheaper when you don’t have to cross an ABI boundary. These sorts of AOT optimizations are easier to justify when they can be definitive rather than speculative thanks to stricter language semantics
-
Agreed, Swift is a much more sensible design for AOT. Obj-C was always…weird :)
- 1 more reply
New conversation -
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.