BT

Mono: Going Beyond the Standard

by Jonathan Allen on Nov 07, 2008 |

Starting with Mono 2.2, Jonathan Pryor's Mono.Options library will be shipping with the runtime. The library itself is not all that remarkable. While certainly useful, especially to those who write a lot of command line application, it is just another library.

But it represents something bigger; Mono is outgrowing the standard. Mono is not just playing catch-up any more, it is trying to move past the CLR in many areas. And as an open source project, they can slip in new libraries at a much faster clip than Microsoft. Instead of trying to build everything themselves, they can simply pick up mature projects like Mono.Options or the collection library C5 and include them in the standard release.

One of the most impressive enhancements announced for the December's Mono 2.2 release is support for SIMD. SIMD is a set of CPU commands that can drastically speed up operations of vectors. Instead of performing operations on each element of an array in sequence, one can use an SIMD instruction to process a vector of up to 16 elements. Below is a list of supported types.

  • Mono.Simd.Vector16b - 16 unsigned bytes
  • Mono.Simd.Vector16sb - 16 signed bytes
  • Mono.Simd.Vector2d - 2 doubles
  • Mono.Simd.Vector2l - 2 signed 64-bit longs
  • Mono.Simd.Vector2ul - 2 unsigned 64-bit longs
  • Mono.Simd.Vector4f - 4 floats
  • Mono.Simd.Vector4i - 4 signed 32-bit ints
  • Mono.Simd.Vector4ui - 4 unsigned 32-bit ints
  • Mono.Simd.Vector8s - 8 signed 16-bit shorts
  • Mono.Simd.Vector8us - 8 unsigned 16-bit shorts

The performance gains are remarkable. Using a Spring-Gravity algorithm, a naive C++ program takes 9.5 seconds to run. By comparison, a literal conversion into Mono takes a pitiful 17.7 seconds. But by switching from standard operators to SIMD functions, the time to run Mono drops to 1.7 seconds.

So what are people planning to doing with Mono? Make games for Windows, XBox 360 and the iPhone. You can see more from the PDC 2008 video on Channel 9.

Hello stranger!

You need to Register an InfoQ account or 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

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Confusion by Johnny Storm

How can one use Mono to develop iPhone applications? I am unaware of any cross-platform compiling technology available at the moment.

Re: Confusion by Jonathan Allen

The first time I heard about Mono on the iPhone was in March. tirania.org/blog/archive/2008/Mar-10.html

The primary restriction is that iPhone is that doesn't allow JIT compiling. Thi is addressed in the new version of Mono, which allows everything has to be pre-compiled using a NGEN-like program before loading it onto the phone.

If I recall correctly, the XBox 360 has the same limitation. Namely, you cannot turn data sections in memory into executable sections.

Ha ha! by Thomas Anderson

I love it! A technology ostensibly developed to allow easier and more modern development of applications for Linux is now largely being used to develop applications that do not run on Linux. Linux simply cannot win, and it astonishes me that anyone even bothers trying anymore.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

3 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT