[Mono-dev] how to improve mono performance

ted leslie tleslie at tcn.net
Thu Nov 17 00:31:37 EST 2005




see mono options:

    --aot                  Compiles the assembly to native code

    --optimize=OPT         Turns on or off a specific optimization
                           Use --list-opt to get a list of optimizations



MS might has similar so it might not mean much for comparisons, 
but can mean a lot just for your absolute runtimes on linux.

some of your times are very short, i.e. 1000ms
you might want to make them go longer (iterate) so as to eliminate what might
be an unfair startup requirement but i am guessing here. Maybe your timing is done
in the code and not just with a "time mono .........." off the shell.

I have done a couple of tests comparing optimized C# to optimized C (on linux)
and generally found C#/mono to be 33% slower then C which actually I 
was very happy to see it so close. Your tests are showing 300%!! average differences
to MS C#, so I am very surprized to see your results having such a difference :(
The integer/floating add test results  just blows me away, as i did a integer add comparison of
C# vs. C on linux and again that was only 33% difference. Its almost as if your floating point part was
done with out fpu (on linux) and done in the CPU fpu on Windows.

-tl


On Wed, 16 Nov 2005 20:30:23 -0800 (PST)
zhu shi song <zhushisongzhu at yahoo.com> wrote:

> Dear lists,
>   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.
>   tks
>   zhu
> 
> 
> 
> 
> 	
> 		
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com



More information about the Mono-devel-list mailing list