That would imply that JS inline caches aren't worth it. I'm skeptical, given that it's completely impossible to write a competitive JS engine without them.
-
-
I mean, it seems obvious that you will sometimes benefit from ICs, so the question is only what threshold you want to kick in the optimization at (via PGO), not whether you should do it at all.
1 reply 0 retweets 0 likes -
Profitable PGO thresholds are one problem. Another problem is that PGO and the associated performance measurement and feedback apparatus is not yet solved, as far as I know.
1 reply 0 retweets 0 likes -
Culturally I think ObjC programmers also tend to hand-optimize the hot parts of their code, either by not using messages at all or manually caching IMPs
2 replies 0 retweets 6 likes -
Yep. People forget the Objective-C is a hybrid language, and the idea is to have fairly coarse-grain Software-ICs implemented in C, connected via message-sends. Also, object allocation, call/return style and keyed-accessing in all its forms are magnitude(s) worse than msg-send.
2 replies 0 retweets 3 likes -
Unfortunately the community got saturated with C++/Java people who never grokked that idea. Thus we have Swift.
1 reply 0 retweets 1 like -
Though admittedly the Smalltalk folks also don't really get the hybrid model. And of course a "pure" programming model is attractive for many reasons. I think applying OO-techniques to our language meta-model actually allows us to have the best of both worlds.
2 replies 0 retweets 0 likes -
Note that ICs were developed as the solution to this problem in Self/Smalltalk. They’re pretty much the only way to make dynamically typed virtual dispatch fast.
1 reply 0 retweets 0 likes -
I am aware of the history, but this is not true: (a) granularity control in a hybrid also solves this and (b) dynamic dispatch just isn't that much of a problem any more. We lose orders of magnitude more elsewhere for much less gain.
2 replies 0 retweets 0 likes -
That is totally contrary to every JS engine’s experience.
2 replies 0 retweets 0 likes
Try to beat V8 or SpiderMonkey with an objc_msgSend like implementation. You won’t be able to do it.
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.