If you put me in charge of objc_msgSend, I think I’d have the compiler scatter a couple of polymorphic inline caches into the binary at each call site (using indirect jumps to satisfy W^X). I think it’d reduce insn count from 11 to ~6, and it would use the BTB better.
-
-
You'd still need some way to notice when the method implementation is changed at runtime and fall back into msgSend.
-
Yeah, I was thinking if you’re doing weird runtime shenanigans you just nuke all the caches. Could also use a global epoch or something at the cost of an insn or two more
End of conversation
New conversation -
-
-
I’m sure you could work on this if you want to join
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Hm... I'm working on ObjC call stuff in Rust, and come to think of it, couldn't you do exactly this as a thingy in Rust, bypass objc_msgSend?
-
Would of course need some pretty heavy compiler plugins, but it should be doable, right?
End of conversation
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.