News for hackers. Stuff that matters.
Re:Why is the mobile web slow? by kybernetyk on Monday July 15, 2013 @10:00AM (#6045545)
It really isn't that big of a deal. Trampolining is pretty straight forward and a caching of memory addresses isn't a big deal either. So I don't know why Apple wouldn't add this optimization to the iOS obj-c runtime.
Re:Why is the mobile web slow? by asveikau on Monday July 15, 2013 @12:36PM (#6046658)
Trampolining is harder to do if you keep around this absurdity (sorry "security feature") of not being able to mark pages as executable. If they open this up for the objc runtime then any other code in the same process would be able to do it too.
Re:Why is the mobile web slow? by pbsdp on Monday July 15, 2013 @01:23PM (#6047017)
You're assuming writable trampolines. objc_msgSend()'s trampoline works by caching the target lookup and having an extremely short fast-path in the case that the target method implementation is cached.

objc_msgSend is a trampoline in the sense that it leaves the frame/registers untouched and jumps straight to the target implementation.

That said, you can implement the kinds of trampolines you're referring to without writable code pages, it just requires more work: http://landonf.bikemonkey.org/2011/04/index.html