facebook rss twitter

Google Android ported from Java to C# and it's blazing

by Alistair Lowe on 3 May 2012, 09:49

Tags: Google (NASDAQ:GOOG)

Quick Link: HEXUS.net/qabf4f

Add to My Vault: x

Please log in to view Printer Friendly Layout

As our readers may know, Google is currently in a legal fight against Oracle over the licensing rights to the Java language within Android, with Oracle seeking £630 million in compensation, along with regular license fees, which would no doubt boost the end cost of Android toting handsets. Currently the jury is out and a decision is expected over the coming weeks.

Meanwhile, however, in quite the impressive feat, Mono developer, Xamarin, has managed to port the vast majority of the Android source code away from Java and over to C#. As a quick history lesson, C# is, like Java, a managed, virtual machine-based, programming language, originally developed by Microsoft. C# and its .NET virtual machine, unlike Java, has since been fully ISO standardised and the framework is covered by a legally binding community promise to not charge users for its use or implementation, making C# a truely free language.

Xamarin's belief was that the Dalvik VM, Google's implementation of Java on Android, was a young virtual machine, lacking in performance tuning and unable to receive optimizations from Oracle's HotSpot. The firm worked to mature code translation tool, Sharpen and, used this to speed along the process. Here are some early results:

Android C# benchmarks

Do this writer's eyes deceive him or does C# Mono severely trounce Java Dalvik? The port isn't yet complete, however, with direct graphics access and some more source code translations yet to come. However, as a C# fan, preferring the language's similarity to industry standard C++, this writer hopes that Xamarin's development continues smoothly and, that perhaps Google, will take note of the firm's progress.

For those who would like to try out the new C# OS, here's the link.



HEXUS Forums :: 15 Comments

Login with Forum Account

Don't have an account? Register today!
got be to some battery savings in those kinds of performance increases.
13thmonkey
got be to some battery savings in those kinds of performance increases.

Xamarin claims there is for sure.
interesting… I hope they manage to do this as id prefer to keep to C# rather than java and it already seems to be more beneficial in performance!
Do this writer's eyes deceive him or does C# Mono severely trounce Java Dalvik?
If that graph is to be believed then that's surely about a six-fold increase in potential performance with moving from Java to Mono. Holy hauling it batman! :eek:
perhaps Google, will take note of the firm's progress
Hmm, if Google have any sense then they should be watching Xamarin VERY closely. If C# can deliver that kind of increase across the board then that's got to be a convincing reason to switch by itself (flipping the bird to Oracle being another good reason).

Got to wonder what Microsoft's take on this would be - if I was in the C# team in Redmond I think I'd be helpless on the floor with laughter or shouting “see, I told you so, Java sux!”

So how long before we get “Android - better powered by .NET!” ads from Microsoft! ;)
crossy
Got to wonder what Microsoft's take on this would be - if I was in the C# team in Redmond I think I'd be helpless on the floor with laughter or shouting “see, I told you so, Java sux!”

The biggest issue is Dalvik sucks. Oracle's Java VM, Hotspot, is faster than Mono - uses buckets more RAM, but is faster. But since Google NIH'd Dalvik, and Dalvik is crap (read: very young and immature compared to everything else) it's not hard for Mono to trounce it.