[Mono-dev] how to improve mono performance

zhu shi song zhushisongzhu at yahoo.com
Fri Nov 18 00:09:51 EST 2005


(1) I feel a little disappointed at the comparsion
results.  I think we should not only prove we can do
this but we can do even better.  The performance fact
is very essential for production applications.  I hope
the mono community can improve performance of mono
largely. Then mono will be depoyed in many real apps. 
We have spent so much effort on it, we shouldn't let
it be reference implementation just for lab.
(2) when I use msft's csc to compile compare.cs, then
I run under linux+mono.  I just got 10% faster than
that compiled by mono mcs. So maybe mono's jit is not
so good as msft's.

  tks
  zhu


--- Ben Maurer <bmaurer at ximian.com> wrote:

> On Wed, 2005-11-16 at 20:30 -0800, zhu shi song
> wrote:
> > I've got one test example and tested it using
> linux
> > mono and windows .NET on the same machine.  The
> > results showed that the performance of linux mono
> is
> > much bad than windows .NET. 
> > Linux Mono:
> >  ArrayList strings test.............3311 ms
> >  StringBuilder test.................4008 ms
> >  Integer & Floating ADD.............15145 ms
> >  Exception test.....................621 ms
> >  Reflection and recursion...........9421 ms
> > Windows .Net:
> >  ArrayList strings test.............1109 ms
> >  StringBuilder test.................1437 ms
> >  Integer & Floating ADD.............2734 ms
> >  Exception test.....................4046 ms
> >  Reflection and recursion...........5843 ms
> > Machine configuration:
> >  RAM: 512M DDR
> >  CPU: Intel C4 2.0G
> > OS:
> >  Windows 2003 Server .NET 1.1 Framework
> >  Fedora Core 4 with mono compiled from svn
> > 
> > Now I try to port my aspx web application to linux
> > mono from windows 2003 .net framework.  But
> regarding
> > of performance, I wonder whether it is deserved.
> >   Maybe I lack some tips to improve linux mono
> > performance.  If someone knows pls help me.
> 
> 
> Chances are, your web application does not add items
> to an array, create
> stringbuilders, add integers, throw exceptions and
> do reflection
> anything like the tests you have configured. I would
> suggest
> benchmarking a ported application rather than these
> micro measurements.
> If you want to do such measurements, I would
> recommend something more
> relevant to your application (database accesses? the
> asp.net pipeline?)
> 
> That being said, some possible reasons for slowness:
> 
> ArrayList/StringBuilder:
> 	Likely the GC.
> 
> Floating Point:
> 	I think msft may be taking advantage of some
> special hardware stuff. I
> highly doubt this is relevant to your application.
> 
> Exceptions:
> 	We super optimized this path :-)
> 
> Reflection:
> 	Not sure, might be worth looking at
> 
> -- Ben
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Mono-devel-list mailing list