Is Mono.NET generating better IL code than Microsoft.NET?
March 11, 2008 – 19:35When working on RemotingLite and MPAPI I came across a couple of oddities, and a single fact that one might expect:
- Mono’’s gmcs.exe compiler generates much less IL code than Microsofts csc.exe.
- Code compiled with Mono’’s compiler runs more efficiently on Microsofts runtime than code generated with Microsofts compiler.
- Code compiled with Mono’’s compiler runs significantly slower on Mono’’s runtime than Microsoft-compiled code on Microsofts runtime.
Keep in mind that this has only been tested with a couple of applications, and that Mono might not be fully optimized to run on my laptop with Windows XP as an operating system. For that this little test cannot be thought of as anything remotely conclusive. Furthermore I am not an expert on Mono, and perhaps I have left out some compiler optimizations that I am simply unaware of. If that is the case then please contact me.
Test setup
For this test I have compiled the RemotingLite v.1.2.3 and MPAPI v.1.0 frameworks with gmcs.exe. I have Mono 1.2.6.0 and Microsoft .NET 2.0 and 3.0 installed on my system. The tests have been done with the two sample applications I wrote for the MPAPI framework. Read the rest of this entry »
