Hacker News new | ask | show | jobs
by markokocic 4779 days ago
Well, Dalvik is not a speed deamon. I don't have any benchmarks on actual phone hardware available, but I can guess that javascript code will not run much slower on phone hardware than on desktop comparable desktop browsers, while Dalvik is a waaay slover than regular Java code on desktop.
2 comments

If going by the stats that Xamarin gave[1] for Dalvik versus Mono on Android 4.0, Dalvik is also much slower than Mono. Though obviously Xamarin is not the most independent source in the findings, but I would believe it to outperform Dalvik in my own uses of both it and Dalvik for Android apps (I bought a license for it 6 months ago).

There's also some results by Koush Dutta[1] (Cyanogenmod contributer and Clockwork Recovery developer) from 2009 showing similar findings, though obviously that's way old and before Dalvik had JIT added in Android 2.2. We had a discussion sometime ago about that article on hn as well[3]

[1] http://blog.xamarin.com/android-in-c-sharp/

[2] http://www.koushikdutta.com/2009/01/dalvik-vs-mono.html

[3] https://news.ycombinator.com/item?id=421862

Dalvik does have a JIT now, and it's much easier to JIT Java in the first place. The difference between deskop and mobile may be smaller with JavaScript, but not by much.

The biggest issue JavaScript+HTML has is memory usage. Cheap phones don't have much memory and Java on Dalvik is much more memory efficient.