|
|
|
|
|
by nostrademons
4242 days ago
|
|
I would love that too, but Python is a poor choice for mobile environments where every CPU cycle costs you battery life. Python code often takes up to 30x more CPU to accomplish the same work. I already get annoyed at how quickly my Moto X drains the battery when navigating or playing games; if that were 30x faster, the phone would be useless. Now, you could argue that maybe Google should just make a more efficient Python interpreter. They did that for Android Java anyway, with Dalvik. But the design of the Python language makes it hard to optimize; witness the failure of Unladen Swallow, and all the incredibly talented engineer-hours that have gone into PyPy. A lot more happens, semantically, in each expression or function call than happens in Java or C. |
|
Performance was obviously not the main goal with Dalvik. If it was they would have gone with something like C++ or Go. The first versions of Dalvik was quite slow. Compact bytecode looks like the design goal which probably made sense since mobile bandwidth wasn't great at the time.