MonoTouch performance vs. Objective-C/Java MonoTouch performance vs. Objective-C/Java objective-c objective-c

MonoTouch performance vs. Objective-C/Java


First, a clarification: on Android, the code is not executed by Java runtime, but by Dalvik (written from scratch by Google). Thus, the Java VM performance is of no relevance to this question.

With this in mind: most programs on Android don't execute native code, but run on Dalvik VM (which runs the translated Java bytecode). The Mono JIT has been benchmarked against it before and was consistently been found faster (check for example http://www.koushikdutta.com/2009/01/dalvik-vs-mono.html ).

On iOS, MonoTouch has to pre-compile the code into a native application before it can be installed on an Apple device (because of license restrictions, which are enforced by the Operating System). That said, both Objective C compiler and Mono's Ahead Of Time Compilation use the same LLVM backend for generating and optimizing the binary code, so the results you will get should be almost identical (with some memory overhead for Mono).

Please remember one important quote from Donald Knuth: "Premature optimization is the root of all evil." Write your code with performance in mind, but remember that maintainability is more important. Optimization should be done only when it's necessary (because usually the compiler will do a much better job than you can).