Hacker News new | ask | show | jobs
by GeneralMaximus 6070 days ago
One of the reasons why Android is slow could be its heavy reliance on Java. You can spend months tweaking and optimizing the VM, but you're still not getting close to C (and Objective-C) speeds.

I wonder what will happen if you put Symbian (which runs on most low-end smartphones from Nokia) on a high-end device like the Droid.

2 comments

I think the reliance on Java has little or nothing to do with Android's overall performance.

I suspect the real difference is that Google has chosen to spend its time and energy in other places (e.g. setting up the open-source project, supporting a wide range of devices, creating flexible and complete developer APIs, etc.) rather than optimizing aggressively for performance from the start. I'd bet all of the interesting bottlenecks (e.g. browser rendering) are native code anyway and the Cyanogen ROMs clearly demonstrate that Google has left plenty of performance on the table so far. Given the pace of Android updates, I expect that to change in the not-too-distant future.

Dalvik has a pretty robust JNI implementation, and you can certainly put native code in an Android application. The NDK is getting more and more useful every release, and there's always building with the full distribution to have access to everything else. I've done it, and it's not that painful. I only worry about what might happen if Android starts showing up on other architectures. You'll have to pack in libraries for every single architecture.

I applaud Rubin's team for choosing Java as the high level library and UI implementation. While ObjC might be speedier on iPhone, it's a huge learning curve for someone that wants to write a UI-heavy app.