Re: [android-developers] Dalvik VM performance
On Wed, Oct 24, 2012 at 1:32 PM, Etienne Fortin <efortin76@gmail.com> wrote:
> I've been wondering for a long time about performance on Android and how it
> can be improved. One area I think is overlooked is Dalvik. From what I can
> understand, Dalvik is a good VM in concept but lack the latest and greatest
> in VM technology. I've seen benchmark compared to other VM that are not very
> positive for Dalvik and the Android plattform. Or look at Android Turbo
> where a highly optimized Dalvik VM outpace anything you can challenge it
> with. And one thing I don't quite understand is the lack of focus on
> improving performance of the VM, given that it is central to all the apps on
> Android.
Dalvik's always been pretty simple, it's design strategy is built
around the Android architecture itself. So it doesn't look like the
"latest and greatest" of a desktop VM because, quite frankly, it's
*not* a desktop VM.
Ugh.. More people giving the "Dalvik is slow" argument without
sufficient numbers to back it... You understand that a large amount
of the app is actually spent in system code, correct?
> So one thing I was thinking is why not impement ahead of time compilation at
> installation time? People are used to have some waiting time while
> installing app. Why not use that time to compile DEX to native codes right
> away and store only that native code with the class structure? Was it tried
> before?
Have you heard of the dalvik cache? That is exactly what is done, not
strictly at compile time but at runtime.
Why can't we do it compile time? Because the Dalvik JIT is trace
based, not class based, meaning that the compilation strategy doesn't
work the same as (say) a HotSpot VM, trace based JIT has a unique set
of problems and tradeoffs.
You're free to look into Dalvik's trace based JIT and suggest
optimizations, doing a trace based JIT actually does change the set of
optimizations you're allowed to make (and you get better / more
accurate predictions about many things!)
kris
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home