News for hackers. Stuff that matters.
Re:Android Is a Dead End by amelius on Sunday July 16, 2017 @08:35PM (#14784874)
> people just aren't that into VMs anymore

Bytecode can be translated quite well to native code. So I'm wondering if this isn't about "VMs versus native" as much as it is about "garbage collected versus unmanaged memory".

Re:Android Is a Dead End by YZF on Sunday July 16, 2017 @08:46PM (#14784926)
What's an example of an ahead-of-time compiler that takes bytecode and spits out native code? Can you do inline assembly for the target architecture? I heard a million time how JIT and JVM "could be" just as fast (or some claim faster) than AOT but in practice it hasn't happened. High performance code is written in AOT/native languages.
Re:Android Is a Dead End by graetzer on Sunday July 16, 2017 @09:15PM (#14785025)
You can definitely do ahead of time compilation with .net bytecode. That's why you can write iOS apps in c# with xamarin's SDK.

I think the performance differences between JIT compiled code and native code mainly come from the 'convenience' features offered by languages such as Java or C#. I am thinking of garbage collection, (default) virtual functions or reflection.

In let's say c++ you can do all of these things too, but the cost is not hidden from the developer.

Re:Android Is a Dead End by gizmo686 on Sunday July 16, 2017 @08:57PM (#14784975)
>What's an example of an ahead-of-time compiler that takes bytecode and spits out native code?

I believe that is how .NET works (the byte code gets distributed, and the user compiles it to native immidietly before execution).

Also, Android's ART is the replacement for Dalvik that compiles Dalvik bytecode into native code at installation.

Re:Android Is a Dead End by jayd16 on Sunday July 16, 2017 @10:07PM (#14785183)
Actually, ART is now "JIT guided AOT." The JIT will (re)compile code as needed but the JIT code is stored to disk, thus creating an AOT binary on future runs.
Re:Android Is a Dead End by jayd16 on Sunday July 16, 2017 @10:06PM (#14785178)
>I heard a million time how JIT and JVM "could be" just as fast (or some claim faster) than AOT but in practice it hasn't happened.

Why do you say this? There's lots of examples out there and Android is one of them.

Re:Android Is a Dead End by YZF on Tuesday July 18, 2017 @03:26PM (#14799319)
How is an Android an example? What AOT are we comparing to here?
Re:Android Is a Dead End by axaxs on Sunday July 16, 2017 @08:38PM (#14784896)
Possibly. The default strategy, at least in the server side world, simply uses too much memory. Compare Go RES memory to an equally implemented Java version. It's typically orders of magnitude smaller.