This week has been interesting.
We have been considering using a new intermediate representation for the JIT compiler in Mono because it was hard with the current framework to implement register allocation.
Dietmar has been researching the various options to move the JIT compiler to: a new intermediate representation was something we considered. Or a new "instruction scheduling" interface that would perform register allocation on "nodes" that would be semantically annotated.
This week, Dietmar had a massive breakthrough: he figured how to add spill/reloads to our current framework and flag the register usage, which allowed us to free registers (two currently) for other purposes. There was no noticeable performance degradation after this change (even without using those two registers).
Now work is moving along the lines of implementing linear register allocation (which is very fast to do, and is almost as good as register coloring).
Some friends came by the office to check out how Mono was doing, and I showed them the Mono C# compiler recompiling itself on Linux. My Linux machine runs at 650Mhz and my Windows desktop runs at 800Mhz.
Timing both compiles took the same ammount of time! It had been a while since I had compared both systems, but my Linux machine was just as fast as the Windows compile.
This is not really a scientific benchmark, as both systems are loaded (Evolution, Nautilus, Galeon with 20 or so web sites open, Gaim, 20 gnome-terminals in Linux; Media Player playing, 5 copies of IE, Gui .NET Debugger, Cygwin with bunch of remote sessions and Word Viewer on the C# spec).
Paolo points out that it might be related to the fact that our Reflection.Emit library is heavily optimized (he optimized this). Also, keep in mind that in the last few weeks a lot of improvements have been done to the Mono runtime by everyone. Ever since Paolo gave us profiling in the JIT, people have been going crazy tuning their code.
Still, the major speed boost for computation intensive code will likely come from deploying linear register allocation; Paolo's CMOV patches plus Sergey's CPU-detection code.
Patrik (totte) wants to contribute 64-bit specific support for PIII machines (now that he is working for Intel).
All in all, things are looking very bright for Mono.
Gonzalo reworked his ASP.NET parser this week to be a top-down predictive parser rather than the jay hack he used (I hever liked that approach anyways ;-). And we have some code generation going on now for ASP.NET pages.
Also Mike Kestner got some more demoable features in Gtk# this week, an interesting acomplishment because it will be our foundation for the System.Windows.Form implementation.
The hackers working on System.Data have gone crazy this week: Daniel Morgan, Duncan Mak, Rodrigo Moya and Tim Coleman have the Postgress backend for the Sql classes working (with nice test suite included ;-). Rodrigo and Gonzalo also got libGDA to be CORBA-free, so it is easier to use now as a wrappable library to implement the OleDB interfaces. So it is all very cool.
Thanks to Johannes, many people have been able to get Windows pre-compiled versions of Mono. This is pretty useful, as they can give it a try without having to download all the source code and all the development tools before they can use it (Cygwin mostly ;-).
A few people are very happy with what we have right now, and a lot of people are sad because we dont have more.
If you want to finance a particular area of Mono, get in touch with me ;-)
Posted on 05 May 2002