InfoQ

News

Mono: Going Beyond the Standard

Posted by Jonathan Allen on Nov 07, 2008

Community
.NET
Topics
Performance & Scalability ,
Game Development
Tags
Mono

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.

Confusion by Johnny Storm Posted Nov 7, 2008 10:11 AM
Re: Confusion by Jonathan Allen Posted Nov 7, 2008 11:04 AM
Ha ha! by Thomas Anderson Posted Jan 22, 2009 11:55 AM
  1. Back to top

    Confusion

    Nov 7, 2008 10:11 AM 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.

  2. Back to top

    Re: Confusion

    Nov 7, 2008 11:04 AM 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.

  3. Back to top

    Ha ha!

    Jan 22, 2009 11:55 AM 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.

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.