JavaScript Core Optimization on Mobile?

Years ago, JSCore on non-macOS disabled JIT, leading to much worse performance than could possibly be achieved with JIT on. Has anything changed recently to permit greater optimizations for JSCore on mobile platforms? (iPadOS, visionOS).

My guess is ”no” since the docs still llist only macOS under the MAP_JIT flag, but as far as I know, Apple could still choose to enable JSCore optimizations behind the scenes if this option were available to developers.

If you want to run Javascript with JIT on iOS, you can use WKWebView.

Has anything changed recently … ?

The only thing that springs to mind is the BrowserEngineKit stuff. See Protecting code compiled just in time. I’m not sure if that changes the story for JavaScriptCore but, regardless, it has a limited scope.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I want the ability to use hooks into native code for functionality that doesn’t exist in the safari browser, so wkwebview doesn’t work.

For example, WebXR with AR passthrough does not exist, even with flags. Passing info from native to wkwebview incurs too much latency for working with interactive time (it’s been shown).

So I think the only open is JSCore. Really I just want to be able to script with optimized JS and don’t need the browser part.

@eskimo BrowserKit would be perfect, and is in fact overkill, but I guess this is just in the EU due to the new regulations. Too bad. I really just wanted to use JS as a stand-in for a scripting layer like Lua.

It's unclear however: does BrowserKit even exist beyond iOS (only that is listed) and does it fail to work even if I am not uploading to the app store? For example, there could be utility in having a web-based scripting layer just for local development.

JavaScript Core Optimization on Mobile?
 
 
Q