Rudxain (talk | contribs)
m wanted: JS; link Py & Lua to WP
Rudxain (talk | contribs)
m rm JIT explanation, rely on WP links; linkify many terms
Line 120: Line 120:


==JIT==
==JIT==
The following paragraph is highly technical: JIT allows for speedy programs/apps, and due to its fast nature, it's used almost everywhere and represents a massive improvement over older code interpreters.
[[wikipedia:Safari_(web_browser)|Safari]] is allowed to use [[wikipedia:Just-in-time compilation|JIT]] to compile code from any site, just like Apple's [https://apps.apple.com/app/swift-playgrounds/id908519492 Playgrounds] app on iPad. Playgrounds bundle Apple's [[wikipedia:Swift (programming language)|Swift]] compiler and share back-end code with the version of Playgrounds found in [[wikipedia:Xcode|Xcode]].


[[wikipedia:Just-in-time compilation|JIT]], which stands for Just-In-Time, is a method of code execution where code, instead of being compiled before being distributed (like an EXE), gets compiled into machine code in real time right before being executed. This method of code execution allows for much faster website loading times, speedier emulation, faster program execution (with programs written in [[JavaScript]], [[wikipedia:Python_(programming_language)|Python]], [[wikipedia:Lua|Lua]]...) compared to interpreters, which instead translate code into machine code line by line, which is much, much slower; JIT also employs many more optimization techniques meant to improve performance.
Third-party apps, such as Pythonista (a [[wikipedia:Python_(programming_language)|Python]] [[wikipedia:Integrated_development_environment|IDE]]), emulators like Delta and [[wikipedia:UTM_(software)|UTM]], and [[wikipedia:Terminal_emulator|terminal]] environments like iSH, are not allowed to use JIT; instead, they must [[wikipedia:Interpreter_(computing)|interpret]] code, which results in severe performance degradation and increased computational expense, potentially draining more battery.
 
Safari is allowed to use JIT to compile code from any site, just like Apple's [https://apps.apple.com/app/swift-playgrounds/id908519492 Playgrounds] app on iPad. Playgrounds bundle Apple's [[wikipedia:Swift (programming language)|Swift]] compiler and share backend code with the version of Playgrounds found in [[wikipedia:Xcode|Xcode]].
 
Third-party apps, such as Pythonista (a Python IDE), emulators like Delta and UTM, and terminal environments like iSH, are not allowed to use JIT; instead, they must interpret code, which results in severe performance degradation and increased computational expense, potentially draining more battery.


An example of apps being heavily affected by this restriction is UTM. UTM is a port of [[wikipedia:QEMU|QEMU]] for iOS, iPadOS, and macOS, allowing users to create [[wikipedia:Virtual_machine|VMs]] that can run various operating systems, such as Microsoft Windows. The iPhone's hardware is capable enough to emulate various modern OSes at full speed. Still, due to Apple's JIT limitation, the team behind UTM had to create UTM SE (slow edition), which doesn't require JIT but is nowhere near as fast as UTM with JIT, only being capable of running MS-DOS and derivatives at acceptable speeds. While methods that enable JIT for apps other than Safari and Playgrounds exist (some are currently working on iOS 18.5, like [https://apps.apple.com/us/app/stikdebug/id6744045754 StikDebug]), Apple does not allow the use of JIT in notarized apps, meaning that apps that support JIT will have to be sideloaded, which comes with its own set of restrictions.
An example of apps being heavily affected by this restriction is UTM. UTM is a port of [[wikipedia:QEMU|QEMU]] for iOS, iPadOS, and macOS, allowing users to create [[wikipedia:Virtual_machine|VMs]] that can run various operating systems, such as Microsoft Windows. The iPhone's hardware is capable enough to emulate various modern OSes at full speed. Still, due to Apple's JIT limitation, the team behind UTM had to create UTM SE (slow edition), which doesn't require JIT but is nowhere near as fast as UTM with JIT, only being capable of running MS-DOS and derivatives at acceptable speeds. While methods that enable JIT for apps other than Safari and Playgrounds exist (some are currently working on iOS 18.5, like [https://apps.apple.com/us/app/stikdebug/id6744045754 StikDebug]), Apple does not allow the use of JIT in notarized apps, meaning that apps that support JIT will have to be sideloaded, which comes with its own set of restrictions.