Pregunta

Based on some googling it seems like JavaScript on ios is JIT compiled sometimes and sometimes not. How about the JavaScriptCore framework that got added in ios 7? Will I get JIT compilation if I use that in my app?

¿Fue útil?

Solución

No, JavaScriptCore on iOS 7+ won't be able to JIT compile for you, because iOS disallows mapping writable/executable pages of memory as a hard rule, and that's a requirement for JIT. Only MobileSafari.app, Web.app and a handful of other system apps carry an entitlement that allows them to JIT compile. The new WKWebView in iOS 8 is rendered in a separate process that is allowed to JIT compile, so JavaScript in a WKWebView is faster than a UIWebView or plain JSContext.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top