Some operations are faster in Java these days, _most_ are functionally equal, and a few special cases (not relevant to most developers), C++ is a better choice. Making the blanket "Java is slow" statement is just factually wrong today. Can we move on from 1992, please?
I'd add to your last statement and say: Write it in the supported platform and verify your assumptions that it is too slow, then see how you can optimize from there on that platform, and then if all that fails, try something custom. http://c2.com/cgi/wiki?PrematureOptimization On Sunday, May 11, 2014 7:40:37 AM UTC-7, Larry Meadors wrote: > > If you're thinking Java is slow on a desktop compared to c++, you're > right - it is. > > But Android doesn't actually run Java. :-| > > You write code using the Java language. It's compiled into Java bytecode. > > That bytecode is then processed again to create Dalvik dex files for > Android. Dalvik is "designed to be suitable for systems that are > constrained in terms of memory and processor speed". > > http://en.wikipedia.org/wiki/Dalvik_(software) > > Your question is analogous to "Are trains better than boats?" If you > need to go across a desert, a train is far superior. If you need to go > across an ocean...not so much. > > If you're trying to decide which way to go, your best bet is to try > both and see. > > It really depends on what you are doing. > > Larry > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

