Re:Nexus One running Android Froyo 2.2 is 450% faster than E...
by nimrody on Wednesday May 12, 2010 @02:22AM
(#1340320)
Well, you could always ship software in platform neutral code and make the final transition to native code when they are installed (either with something like gcj or use some intermediate representation like LLVM does).
[ Parent
| on HN ]
Re:Nexus One running Android Froyo 2.2 is 450% faster than E...
by theBobMcCormick on Wednesday May 12, 2010 @10:38AM
(#1341030)
I think that would have it's own complexities. You'd have to ship each phone with a compiler and related toolchain. You'd also end up with two copies of each application installed on the users phone (one in the neutral format and one native). Sound like kind of a messy approach.
Really, the existing non-jit'ed Dalvik VM runs fast enough. If you think about it, their decision to ship a non-JIT VM and enhance the platform with JIT later is very much like Apple's approach with the iPhone of initially shipping the product without cut-and-paste and without any native API for third party apps, but then enhancing the platform later by adding those (and many other) features later. Both companies shipped when they had a platform that was "good enough", then have kept iterating and improving.
Re:Nexus One running Android Froyo 2.2 is 450% faster than E...
by wgren on Wednesday May 12, 2010 @08:34AM
(#1340755)
That is basically what JIT is. Why reinvent the wheel when they can use the resources that has been poured into JVM research?
Re:Nexus One running Android Froyo 2.2 is 450% faster than E...
by jbellis on Wednesday May 12, 2010 @08:42AM
(#1340766)
Except they can't, really. Dalvik is completely unrelated to Hotspot or any other JVM out there. (Remember that Android doesn't run Java class files natively, it's first compiled into dex.)
Re:Nexus One running Android Froyo 2.2 is 450% faster than E...
by wgren on Wednesday May 12, 2010 @08:48AM
(#1340778)
Right you are jbellis. Had forgotten that Dalvik isn't just a small JVM but a completely different architecture (register based, etc).
But anyway, what nimrody suggested is what they are doing - using platform neutral Dalvik bytecode and then transition to native through JIT.