4 ms·
If your runtime is a JS interpreter, on iOS you’re almost always better off just using the OS’s interpreter (JSC). Your app will be smaller, and only the OS is
by iainmerrick 3y ago
If your runtime is a JS interpreter, on iOS you’re almost always better off just using the OS’s interpreter (JSC). Your app will be smaller, and only the OS is allowed to do JIT so it will be much faster.
Even without the JIT restriction, you wouldn’t be able to beat JSC as it’s one of the fastest runtimes out there, pretty much level with V8.
Static Hermes sounds like a different prospect, though, if it’s able to use TS annotations to compile to mostly-static native code. That could be great for genuinely high-performance TS code. (Although you wouldn’t want to immediately shackle it to React Native...)
- jamil7 3y agoI believe JIT is disabled in JSC itself on iOS, to take advantage of JIT in JSC you'd have to go through an out-of-process WKWebView instance.
- saagarjha 3y agoJavaScriptCore (the framework) does not use a JIT because it runs in-process. JavaScriptCore (running in a webview) does because it’s out-of-process.