News for hackers. Stuff that matters.
Re:V8: A Tale of TurboFan by Twirrim on Thursday March 02, 2017 @10:10AM (#13774506)
iOS's advantage in this is that the hardware range is small. It's feasible to do full AOT away from the end user's device.

With Android there are hundreds or thousands of combinations of various bits of hardware and drivers, with various levels of compatibility. Device manufacturers have a terrific advantage in being able to produce hardware that is more specialised for the purpose, but there are trade-offs. Compiling all possible variations AOT away from the end device is going to be difficult.

Re:V8: A Tale of TurboFan by mwcampbell on Thursday March 02, 2017 @10:14AM (#13774541)
Not really. Practically all Android devices support ARMv7 binaries. They have to, in order to work with applications that use the NDK. If what you say about Android were true, then AOT compilation for Windows on x86 wouldn't be feasible either.
Re:V8: A Tale of TurboFan by tachydyne on Thursday March 02, 2017 @07:38PM (#13779793)
This comment reminds me, there are actually a bunch of Android tablets that shipped with Intel Atom x86 processors. Intel worked some magic with libhoudini that allowed them to run ARM binaries surprisingly fast. If you're an app maker who actually cares about those devices (like my employer) then you end up building all your native code for x86 too. I recall the ARM binaries running at more than 50% of the native x86 ones, running optimized threaded and vectorized image processing code. I wish Intel would talk more about that library. I'd love to know what techniques it used.
Re:V8: A Tale of TurboFan by mike_hearn on Thursday March 02, 2017 @10:15AM (#13774550)
The Play Store could AOT compile things on the server side. I don't know why it doesn't, it seems like such an obvious win.
Re:V8: A Tale of TurboFan by kllrnohj on Thursday March 02, 2017 @02:18PM (#13777263)
It's done on-device to handle the problem of linking. All calls from the app into framework have to be linked when you do AOT, and Google can't do that without having device images of every android device and compiling on-demand for whatever device is requesting the install.

And then you'd still have to fall back to on-device compilation if Play Store doesn't know what the device is anyway (aka, all custom ROMs), or when you take an OTA (otherwise you'd need to re-download all installed apps for the new OTA image).

Plus, the dex bytecode is considerably smaller than the AOT result, so wire transmission costs are cheaper doing on-device compilation - call it a form of compression.

Re:V8: A Tale of TurboFan by esprehn on Thursday March 02, 2017 @11:16AM (#13775207)
The binaries produced from the AOT process are too large to download over the network for typical users and data plans.
Re:V8: A Tale of TurboFan by pjmlp on Thursday March 02, 2017 @12:29PM (#13776061)
Yet Apple and Microsoft managed to do it.
Re:V8: A Tale of TurboFan by mike_hearn on Thursday March 02, 2017 @01:55PM (#13777030)
In fairness, they managed to do it only for the highest of high end users. Apple institutionally doesn't care about anyone in places like China, India or Africa where data is expensive. That's why Android completely dominates the global smartphone market share.

I guess nothing would stop the Play Store from AOT compiling binaries just for users with fast connections though.

Re:V8: A Tale of TurboFan by pjmlp on Thursday March 02, 2017 @02:14PM (#13777223)
Windows Phones were widely available in India, before everything kind of felt apart, though.
Re:V8: A Tale of TurboFan by kllrnohj on Thursday March 02, 2017 @02:20PM (#13777283)
Microsoft ships .NET bytecode (so basically the same thing Android does) and Apple doesn't care about the low end.
Re:V8: A Tale of TurboFan by pjmlp on Thursday March 02, 2017 @02:38PM (#13777457)
No it doesn't.

WP 8 and 8.1 use MDIL, Machine Dependent Intermediate Language, basically machine code with jump targets kept as symbolic links, replaced at installation time.

WP 10 uses .NET Native.

I can gladly point out the respective Microsoft documentation, BUILD and Channel 9 presentations.