XobotOS: Android Build on C# Instead of Java
Miguel de Icaza, Mono’s founder, recently announced the creation of the XobotOS research project. XobotOS is the Android operating system with all Java code removed and C# code put in its place. Miguel offers two compelling reasons behind this research project:
Unlike Sun with Java, Microsoft submitted C# and the .NET VM for standardization to ECMA and saw those standards graduated all the way to ISO strong patent commitments. The .NET framework is also covered by Microsoft’s legally binding community promise.
The second is an issue of platform maturity:
Over and over we came back to the basics: Dalvik is a young virtual machine, it is not as performant or tuned as Mono and suffers from many of Java’s performance limitations without the benefit of the high-end optimizations from Oracle’s HotSpot. One crazy idea that the team had at that dinner was to translate Android’s source code to C#. Android would benefit from C# performance features like structures, P/Invoke, real generics and our more mature runtime.
In order to translate the over 1 million lines of Java code in the Android operating system the Xamarin team turned to a project called Sharpen. Using some simple benchmarks comparing generic support in Java and C# they were able to show some significant improvements. The below chart is part of the aforementioned press release:

There is a XobotOS github site available, but Xamarin does not plan on supporting the project directly. Instead they will be using what they learned to improve the performance of their Mono for Android product by replacing performance sensitive code Java code with C# alternatives. In addition to C#’s apparent performance benefits, this would reduce the number of marshaled calls between the Mono and Dalvik virtual machines.
Cool project, but I could do without the hype
by
peter lin
The most mature VM today is Azul's. Nitpicking aside, it is nice to have C# as an option.
Re: Cool project, but I could do without the hype
by
Jonathan Allen
And really, what do we know about Dalvik? All I personally know is the uses a register-based VM instead of a stack based VM like Java and .NET, which means a lot of the research into that area cannot be reused. It's JIT compiler is less than two years old (it's birthday is the 20th), and I heard (unconfirmed) claims that Dalvik does not yet have a generational garbage collector.
If you show me evidence otherwise I'll believe you, but right now the guys at Mono are only source of expert opinion on the matter.
Re: Cool project, but I could do without the hype
by
peter lin
The Mono guys are experts at Mono, but it would be a stretch to claim they are experts in Dalvik. To really get a full and complete picture would be to have both teams do an exhaustive test and compare notes.
My original point is Mono's hype is silly. The project is neat, but there's no need for all that hype.
I like it..
by
M Vleth
Re: Cool project, but I could do without the hype
by
Cameron Purdy
And really, what do we know about Dalvik?
Really? Seriously? Perhaps you could .. um .. "google" it?
(And really, what do we know about Mono?)
Re: Cool project, but I could do without the hype
by
Jonathan Allen
Mono, on the other hand, has been quite vocal about their work. They regularly talk about where the VM is weak and what they are doing to improve it.
This is not unexpected. Mono is a choice, so it needs advertising. Dalvik is a default, if you choose Android you get it whether you want it or not.
Re: Cool project, but I could do without the hype
by
Cameron Purdy
Try it. Perhaps you will have more luck but I haven't seen much on the Dalvik runtime itself.
I found the source code for Dalvik on source.android.com/
Since you caused me to look, I decided to take a peak at these "significant improvements":
Using some simple benchmarks comparing generic support in Java and C# they were able to show some significant improvements.
Improvements? Judge for yourself:
for(int i=1; i<=n; ++i) {
hashtable.put(i, 1.0f / i);
}
My oh my, that looks like a micro-benchmark of Java doing auto-boxing versus C# not doing auto-boxing.
I honestly can't believe you are repeating this nonsense. This was old news five years ago.
(To be clear, this is an example of where C# has improved on Java. That would have been a legitimate technical point. In fact, it is a legitimate point, and it's been made ad nauseum over the past half-a-decade.)
Extrapolating from a few flawed (apples vs. oranges) micro-benchmarks is bad enough, but at least the people doing the benchmarks had a horse in the race. The real question is why you would parrot their nonsense?
Peace,
Cameron.<//pre>
Re: Cool project, but I could do without the hype
by
peter lin
Lots of bitterness from the usual suspects
by
Dan Tines
Don't worry guys, it's been thrown on Github and it's basically been said that Xamarin isn't going to pursue anymore out of it.
Changing the subject?
by
Cameron Purdy
Lots of bitterness from the usual suspects
So instead of addressing the criticisms raised, you just launch straight into an ad hominem attack.
First of all, this isn't about .NET or Java (both of which I work with, and both of which I like just fine). It's not even about Mono or Dalvik (neither of which I work with, but I'd put a 99% chance of liking them if I did get to work with them). Come on, the article (i.e. the editor) asked "And really, what do we know about Dalvik?" And then proceeded to parrot Miguel's purposefully-misleading micro-benchmarks. That's lousy from almost any perspective.
However, if you want to turn this into a conspiracy, then by all means don't let rational thought stand in your way.
Re: Lots of bitterness from the usual suspects
by
peter lin
Just because I don't blindly jump for joy when some project does a hype PR release, doesn't mean I dislike the project. I do play devil's advocate and "throw a fit" as you say. I've been known to "throw a fit" against CEP hype, business rules hype, data grid hype and every other retarded PR release.
I just call it as I see it. I don't feel it's fair to claim Cameron is trolling.
I on the other hand definitely troll, especially when someone says "spring is light, maven is awesome and x will solve all your problems." On the other hand, when a PR release is grounded and doesn't resort to BS non-sense, I generally post positive comments.
C# ECMA specification
by
Wendong Li
On Wikipedia it says: "As of December 2010, no ECMA and ISO/IEC specifications exist for C# 3.0 4.0, and 5.0."
Anyone knows about the current status?
Re: Lots of bitterness from the usual suspects
by
Mark N
Re: Lots of bitterness from the usual suspects
by
Mark N
Educational Content
Writing Usable APIs in Practice
Giovanni Asproni May 19, 2013
Concurrency in Clojure
Stuart Halloway May 17, 2013




Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think