InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Mono: Going Beyond the Standard

Posted by Jonathan Allen on Nov 07, 2008

Sections
Development,
Architecture & Design
Topics
Game Development ,
Performance & Scalability ,
.NET
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
Re: Confusion by Jonathan Allen Posted
Ha ha! by Thomas Anderson Posted
  1. Back to top

    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.

  2. Back to top

    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.

  3. Back to top

    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.

Educational Content

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?

Wrap Your SQL Head Around Riak MapReduce

Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.