Skip to content

Comment on Python for Androidparent

Comments

Google should use Go for Android... Cleaner than Java, faster than Java (on Dalvik).

I can imagine how slow Python on ARM Android is.... and people complain about Java code being slow on Android... I would put money on JS/V8 being faster than Python on Android too.

The following comparison is JVM vs Python, so its really pretty far off the scenario we are discussing, but consider it shows almost up to two orders of magnitude difference..

http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...

http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...

It would be great if Go could be used as a reasonable alternative to Java on Android. Or Clojure. Or Python. Or Lua.

You can already use all of these on Android, but any kind of visual programming is a pain in the ass since you have to do Java interop, and start-up is slow because of the apk unpackaging requirements.

Non-portable. While android primarily runs on ARM boxes, the same APKs, barring any native code libraries, will run on x86 devices running android, MIPS devices, etc.

Go is portable... you just need to compile on the target. Go is write once, compile and run everywhere. Compiling would be part of the app install process; Compiling Go is much lighter than compiling C anyway.

NDK also lets you compile one binary for all device architectures now as well.

I think Google should require every app that uses the NDK to provide ARM, x86 and MIPS binaries.

Compile on install? Compile to something else then compile to binary? PNaCl?

I would go with "compile on install"

Google should've never cared about making Android work on x86. The ARM environment is an order of magnitude more competitive than the x86 one. So it's not like they need it for the "competition". If they'd like to have Android on PC's eventually, well they don't have to worry about that either, since ARM is disrupting Intel anyway, and will be the architecture of the future, being pushed by both Android and iOS, the most popular platforms right now (and even Windows is promoting it, although in a smaller way).

There are MIPS android devices too, I have one and it works well except when people write junks of their app in C and didn't upload the MIPS binary. Maybe with the recent POWER announcement we will see POWER devices.

Make Dalvik/JVM a compile target for Go? There is at least one project working on this.

Its not clear if the python code was compiled on their benchmarks. That might close the gap.

On the tests where Java was much faster, the Python solutions took minutes. Compilation would not be a big deal compared to that.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.