On Jun 12, 9:42 am, Horia <[EMAIL PROTECTED]> wrote: > Secondly, the guidelines page (http://code.google.com/android/ > toolbox/performance.html) advise the user not to write highly object- > oriented code so my presumption is that these kind of applications > won't run very fast on Android.
A lot of these suggestions revolve around avoiding the creation of temporary objects. This is not something that a JIT is going to solve, it is a problem that churning through objects creates a lot of overhead in the memory system: both in stress in the garbage collector, and in how much you hit the memory bus (keep in mind these devices have very small memory caches, and generally a fairly slow memory subsystem). This is an area where the Java language model can lead to especially poor efficiency, since if you are trying to write "extremely object oriented code" you are probably going to be tearing through a lot of temporary objects, and seriously stressing the memory system due to the lack stack-based objects. It just boils down to the fact that writing for mobile devices is not the same as writing for the desktop. If we had a C++ API, we would likewise have guidelines for how to write efficient C++ code; even in C++, "extremely object oriented code" tends to introduce significant overhead in copying data around between objects. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Internals" group. To post to this group, send email to android-internals@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-internals?hl=en -~----------~----~----~----~------~----~------~--~---