Can I now use a JIT for an iOS application that is to be distributed through the store?
Asked Answered
W

2

8

A few years ago the same question came up, has Apple updated the submission rules to allow JITters in submitted applications yet? The opensmalltalk-vm is about ten times faster than the non-JITting version, and even the apple watch has enough ram to easily run it.

Waterrepellent answered 27/8, 2016 at 15:13 Comment(2)
I'm voting to close this question as off-topic because it is about an app store's policies and procedures, rather than programming. See Are developer-centric questions about application stores on topic?Caro
Closing these kind of questions is exactly why SO is becoming so useless.Waterrepellent
C
6

Apple's policy has not changed. Apps that need a PROT_WRITE | PROT_EXEC page are not approved for the store, which would be needed for the JIT.

I see two ways around this:

  1. Use AOT, not JIT: Modify Cog so it can store the jitted code to a file. Do so on the dev machine while running a coverage test for your app. That should jit all the code. Put the code file into the App bundle. At runtime, load the file into a PROT_READ | PROT_EXEC page and execute all methods found there. All others need to be interpreted.

  2. There is a way to run a JIT in your app: Apple's JavaScript JIT. It's the fastest on all mobile platforms currently. You can help making the code generator of SqueakJS produce more efficient JS code. This would allow running all Smalltalk code on the JIT, even new methods.

Cacique answered 28/8, 2016 at 8:4 Comment(1)
Am I correct in thinking that the Sista kind of optimizations do not map well to the 1st approach?Waterrepellent
H
2

You could look at Pharo-JS which allows you to develop in Smalltalk and deploy to Javascript; this can then run as an iOS (or Android) app via Cordova or PhoneGap.

The Pharo-JS presentation at the recent ESUG 2016 conference provided a demonstration of the latter (around 25 minutes in).

Heroin answered 29/8, 2016 at 7:49 Comment(1)
How useful will your answer be once the external links are gone? A good answer will always have an explanation of what was done and why it was done in such a manner, not only for the OP but for future visitors to SO.Stephanistephania

© 2022 - 2024 — McMap. All rights reserved.