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

but Android is just based on Linux, so in theory you could tweak a regular Linux server on ARM hardware to get good energy efficiency. The downside of Android is its reliance on Java, which adds a lot of overhead compared to bare-metal languages (I strongly believe - but have no sources or figures to back this up - this is why Apple phones have been faster and more energy efficient, especially in the earlier days (think iphone 4 and co)



Android doesn't run apps in a Java VM. At build time, the Java bytecode is translated to DEX bytecode, which is designed specifically for Android. Today, at install time, the Android runtime compiles DEX bytecode to native code. You're probably right about this being true in the early days, but not so much anymore.

I think the power usage difference between Android and plain Linux on the same hardware is mainly due to the way Android aggressively puts the CPU into sleep states and uses timers (etc) to wake it up as needed.


I'm no Java enthusiast but this screams for source.

I'v always thought it is how iOS manages threads vs in a way Android cannot. But all that info is from more than decade ago, so things may have changed. Can anyone chime in to explain?

To this day iOS feels snappier, perhaps lower latency input/output or something. Am saying as someone who uses and prefers Android and currently using Samsung Galaxy S10 phone (flagship phone line)


Android has the NDK now, it can run native code with only tiny headers of java to launch it, plus ART compiles the Java anyway as I understand it.

Regular Linux could be tweaked, but I think it would be way easier to start on Android and add all the missing stuff you want for a server, than to start on Linux.

Regular Linux still uses a bit more power, and they don't have any kind of container+sandbox that works quite as well, on account of the very tiny userland API that requires containerized things to bring all their own libraries, making them like 800MB a lot of the time, can't really run more than a few apps in 16GB of cheap slow flash like that.


> Regular Linux could be tweaked, but I think it would be way easier to start on Android and add all the missing stuff you want for a server, than to start on Linux.

I severely doubt it.


Things still break on Linux almost every update. Android has a lot that Linux doesn't, as far as I know Linux has very little that Android doesn't other than easy support for legacy Linux apps.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: