1

I was wondering if there is any AOT compilation options for the mono for android platform (or anything planned?). I am asking this because I will port a game using mono for android, and performance is really important, this is why I wanted to know if AOT compilation is available (or any other compilation option that can produce better performances) I know that Monotouch uses AOT compilation, and that it can optionally use llvm as compiler in order to make some optimisations. So, I am wondering if the same options are available in mono for android.

Thanks in advance

1 Answers1

0

AOT is not available in Mono for Android, I don't think it is on the road-map either.

As far as I understand JIT is not slower than AOT, rather the contrary, because JIT can use the information it knows about the environment it runs on to optimize code to it. An AOT compiler cannot know everything about the same environment.

This thread: Why is Java faster when using a JIT vs. compiling to machine code? has some answers that elaborates on this.

So I really doubt that you would get any performance improvements if there were an AOT compiler.

Community
  • 1
  • 1
Cheesebaron
  • 24,131
  • 15
  • 66
  • 118
  • Interesting thread but I think JIT **can** be faster but are not faster today. If you look at [Miguel de Icasa post](http://tirania.org/blog/ called) "Can JITs be faster?" especially this : JIT compilers tend to go for fast compile times over quality of the generated code ... you get from LLVM with C. You can see that their is a possibility to improve code performance.(if JIT was that fast, I don't think the option would be available) – user1475827 Jun 25 '12 at 11:01
  • In my question I was also asking for anything that can improve code performance (not only AOT), if I look at [these slides on Mono](http://tirania.org/slides/AltDevConf-2012-Mono.pdf) , the "Disabling Arrays Bounds Checking" slide state that using –O=unsafe can disable some arrays bounds checking and thus improve performance. I see no trace of this for mono for Android.Same for [SIMD instructions](http://tirania.org/blog/archive/2008/Nov-03.html) that I cannot find on mono for Android.This is why I was wondering if something is in the road map. – user1475827 Jun 25 '12 at 11:02