Hacker News new | past | comments | ask | show | jobs | submit login

I wonder if it would make sense to rewrite some native components of Android in Java now. Presumably, whole-program optimization means that the ART compiler is more effective if more of the code is in Java (or technically, Dex bytecode) rather than having opaque native parts with JNI overhead.



A lot of Android is written in Java already. What would be interesting, however, is Android transitioning to a message passing micro-kernel (instead of Linux) and writing as much as possible of the rest of the kernel in Java.


That is already the case. When you look at the NDK, you can only have access to game related API (audio, graphics and sensors) almost everything else involves JNI.


Actually quite a bit of the view code is native still - start reading the source for View etc and you hit a level where it's mostly calls out to native libraries. e.g https://github.com/android/platform_frameworks_base/blob/mas...


Well, graphics code eventually needs to speak to the graphics card.

I imagine outside graphics, audio and hardware integration APIs, there is very little done at C level.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: