5 ms·
A shame operating systems like iOS/iPadOS do not allow JIT. iPad Pro's have such fast CPU's that you cant even use fully because of decisions like this.
by klipklop 1y ago
A shame operating systems like iOS/iPadOS do not allow JIT. iPad Pro's have such fast CPU's that you cant even use fully because of decisions like this.
- Pulcinella 1y agoThose operating systems allow it, but Apple does not. Agree that it is a total waste.
- duped 1y agoWhat advantage does JIT compilation have over Swift or Obj-C?
- saagarjha 1y agoIt speeds up interpreted languages.
- Pulcinella 1y agoAnd emulation.
- saagarjha 1y agoWhat is an architecture but a scripting language to interpret? ;)
- duped 1y agoI get that, but what interpreted language do you want to write iOS apps in when there's Swift and Obj-C right there, with bespoke support and tooling from Apple? And if you care about performance, why aren't you writing that code in native to begin with?
- saagarjha 1y agoWhy would you care about faster cars when planes exist?
- ranger_danger 1y agohttps://0x0.st/XJZT.jpg https://0x0.st/XJZT.jpg
- ranger_danger 1y ago...Javascript.
- bencyoung 1y agoJIT compilation can be faster for compiled languages too, as it allows data driven inlining and devirtualization, as well as "effective constant" propogation and runtime architecture feature detection
- varjag 1y agoIt can be but it never is.
- __s 1y agoEspecially after PGO (profiling guided optimization) gets most of the way there
- ignoramous 1y agoTo re-optimize compiled code blocks isn't without effort. Google has publicly spoken about AutoFDO and Propeller [0], after Meta had open sourced BOLT [1] in 2021. AutoFDO has since been ported to Android and adopted by Yandex [3]. [0] https://lwn.net/Articles/995397/ https://lwn.net/Articles/995397/ [1] https://news.ycombinator.com/item?id=40868224 https://news.ycombinator.com/item?id=40868224 [2] https://news.ycombinator.com/item?id=42896716 https://news.ycombinator.com/item?id=42896716
- Rohansi 1y agoBut is that because of JIT compilation or other decisions for how the language should work (dynamic typing, GC, etc.)?
- ranger_danger 1y agoHard disagree. Many newer game system emulators (32-bit and up) rely on JIT or "dynarecs" to get playable speeds, and they pretty much all use high performance compiled languages already. They often double the performance over their interpreter or more.
- duped 1y agoIs there a production JIT for a compiled language that is actually faster? I understand the theory, I don't think the practice backs it up.
- almostgotcaught 1y ago> that you cant even use fully because of decisions like this. Have no clue what this means - you can pre-compile for target platforms and therefore "fully" use whichever Apple device CPU.
- deleted 1y ago[deleted]
- pjc50 1y agoYou can't precompile your web page's Javascript for iOS, even if you're willing to have it signed and notarized and submitted for policy review.
- tgv 1y agoApart from the fact that its JS engine is really fast, Safari accepts WebAssembly. What else would you precompile it to?
- true_religion 1y agoOriginally, iOS Safari handled WASM but only with JIT disabled. However the EU decreed that it must allow for fair competition, leading to it claiming that it will enable JIT for authorized developers: https://developer.apple.com/support/alternative-browser-engines/ https://developer.apple.com/support/alternative-browser-engi... But I'm not sure that they have done so... Mozilla: https://github.com/mozilla/platform-tilt/issues/3 https://github.com/mozilla/platform-tilt/issues/3 Chrome: https://issues.chromium.org/issues/42203058 https://issues.chromium.org/issues/42203058
- pjscott 1y agoThey do, technically, allow JIT. You need a very hard-to-obtain entitlement that lets you turn writable pages into executable read-only pages, and good luck getting that entitlement if (for some reason) your name isn’t “mobilesafari”, but the capability exists.
- Wowfunhappy 1y agoWhen you say it's "hard" to obtain--is it possible to obtain if you aren't Apple? Does Apple ever provide it to third party developers, or is there even a path to requesting it?
- j16sdiz 1y agoYes.
- cmeacham98 1y agoSource? Is there any non-Apple app that has this entitlement?
- Rohansi 1y agoIf your app happens to be a browser that's only usable in the EU then: https://developer.apple.com/documentation/browserenginekit/protecting-code-compiled-just-in-time https://developer.apple.com/documentation/browserenginekit/p...
- gf000 1y agoI believe the Delta emulator has JIT support, but possibly only when installed as a developer.
- Wowfunhappy 1y agoAs far as I can tell, you need to connect your phone to a PC running software which enables JIT by exploiting a feature intended for remote debugging. https://faq.altstore.io/altstore-classic/enabling-jit https://faq.altstore.io/altstore-classic/enabling-jit
- ivankra 1y agoThey allow, but Apple's policy is to lock down that ability pretty much just to Safari/WKWebView. If you could transpile/compile your program to JS or WASM and run it through one of these blessed options, it should get JIT'ted.
- xxs 1y agoOf course they do - this is how javascript in any site works