JIT Compiler

#1

We aim to keep Defold the same across all platforms, but we currently have a small discrepancy between Lua versions. For HTML5 and iOS 64 bit platforms we use Lua 5.1 but for other platforms we use LuaJIT. LuaJIT is based on 5.1 but contains a few additional features.

Can anyone tell me if de JIT compiler is active in those versions with support to luajit? Or is just the interpreter? In this topic, @britzl says that the JIT compiler is disabled on 32-bit cpus (why this?), but the topic is relatively old.

Sorry if there is some error, English is not my strong point.

0 Likes

#2

JIT compilation is not allowed by Apple on iOS meaning that 32 bit iOS apps will have jit disabled. And on 64bit iOS we use Lua 5.1 since LuaJIT for 64 bit Arm CPUs is still in beta. All other platforms running LuaJIT has JIT enabled. You can do a runtime check for availability. Check LuaJIT page for details.

0 Likes

#3

JIT is now supported on iOS with the latest update 14.2 apparently. But it’s only for newer devices:

To use JIT, your device must be running iOS 14.2 and have an A12 processor or newer. At the moment A11 and below do not support iOS 14.2 JIT.

1 Like

#4

I still haven’t seen any official statements around this?

1 Like

#5

As described by Testut, Apple has added support for JIT compilation in iOS 14.2 beta 2 — but this has never been publicly mentioned by the company. The support was maintained throughout the betas and was kept in the final release. The developer believes this is an official implementation rather than a mistake by Apple, but there’s no way to confirm this for now.

I don’t see anything official still but the fact it was known about publicly in the betas and was kept in final seems promising.

0 Likes

#6

I would prefer to see some official statement before we make any changes. Does anyone have a contact at Apple? We have good contacts at Google but not really at Apple unfortunately.

2 Likes