Originally posted by Togga
View Post
So for this reason, the Hello world in WinRT world, will be just some KB on disk. It doesn't matter that .Net represents let's say 30% of Windows 8 tablet install (is smaller, but just to take as a random number to not argue about it), because the applications that we get over the internet, that would likely combine to make what Win8 represents, would not be an extra burden for developer to provide.
In this very same way is the same with Android and Java language: it is a part of the phone, is not an extra baggage, and even better, is smaller than the corresponding full compiled code, so is always smaller than a compiled application.
But if we talk for a custom solution, let's say a complex game, is legitimate to ask, what should be picked: a C/C++ code, or my application with an embedded VM. And the answer I think is always: depends. As for me, if the VM is not running in an interpreter, and you have a profiler (so you can write well the slow parts), and is included as part of the OS, I think is better to target the VM. Looking for leaks is always ugly. If we talk with higher end tablets, 5 MB extra for an application like this Android one (44 MB download size) is likely to not be noticed. In most cases because Mono have (more functionality) and the generics compile at runtime, so not many template expansions would make huge binaries, so you may have a smaller application to start with. Also MSIL is more compact than the binary (Dalvik presentation states that Dalvik is likely 6x times smaller than the tracing JIT generated code, a GCC like compiler can generate even bigger code).
At the end, if the generated binary code can get like 5x bigger than the "high level" MSIL/Dalvik or JVM bytecode, as bigger is the application as bigger are the savings. At the end there is one last thing: Android would "reincarnate" in more platforms/hardware combinations like: MIPS, x86. Is impossible to target with a static approach any future CPU. So the easiest way is still to write Java, or may use Mono and just recompile, and let Xamarin to hassle with GCC flags and issues like this.
Comment