[Mono-devel-list] Language Shootout - problems with Mono times

Andreas Nahr ClassDevelopment at A-SoftTech.com
Wed Sep 1 07:36:57 EDT 2004


Sorry - but this test is completely flawed.
You are not testing the speed of the sieve here, but you are testing the 
speed of Console.WriteLine().

Look at the stats from Mono. The first one is the original bench. The second 
is the same bench with Console.WriteLine and System.Convert removed. Do you 
see the diffenence? Memory 107462 -> 2173 Bytes!

If you test the speed you will see that most of the time is also spent in 
the static constructor for the Console class. So if you want to measure the 
speed of a sieve don't use classes that need to support 
internationalization. Especially when comparing with things like gcc that 
IMHO don't do any internationalization with the respective functions called 
there...

C:\>mono --stats text.exe 1000
Count: 1028
Mono Jit statistics
Compiled methods:       550
Methods from AOT:       0
Methods cache lookup:   348
Method trampolines:     1592
Basic blocks:           4335
Max basic blocks:       154
Allocated vars:         4457
Analyze stack repeat:   0
Compiled CIL code size: 47983
Native code size:       107462
Max code size ratio:    7,00 (Object::.ctor)
Biggest method:         11166 (SHA1Internal::ProcessBlock)
Code reallocs:          4
Allocated code size:    107462
Inlineable methods:     0
Inlined methods:        10

Created object count:   4234
Initialized classes:    263
Used classes:           152
Static data size:       1609
VTable data size:       15576

Generic instances:      0
Inflated methods:       0
Inflated types:         0
Generics metadata size: 0

C:\>mcs *.cs
Compilation succeeded

C:\>mono --stats text.exe 1000
Mono Jit statistics
Compiled methods:       27
Methods from AOT:       0
Methods cache lookup:   10
Method trampolines:     304
Basic blocks:           161
Max basic blocks:       19
Allocated vars:         133
Analyze stack repeat:   0
Compiled CIL code size: 878
Native code size:       2173
Max code size ratio:    7,00 (Object::.ctor)
Biggest method:         569 (sieve::Main)
Code reallocs:          0
Allocated code size:    2173
Inlineable methods:     0
Inlined methods:        0

Created object count:   57
Initialized classes:    45
Used classes:           28
Static data size:       209
VTable data size:       2984

Generic instances:      0
Inflated methods:       0
Inflated types:         0
Generics metadata size: 0

Andreas

----- Original Message ----- 
From: "Isaac Gouy" <igouy2 at yahoo.com>
To: <mono-devel-list at lists.ximian.com>
Sent: Wednesday, September 01, 2004 4:05 AM
Subject: [Mono-devel-list] Language Shootout - problems with Mono times


> Sorry if this is somewhat OT.
>
> We're having problems getting consistent times for the Mono C# programs
> in  "The Great Computer Language Shootout"
> (Mono C# has been pulled from the shootout once already because of this
> problem - it would be good to fix it this time.)
>
> Mono C# is good but not this good ;-)
> http://shootout.alioth.debian.org/bench/sieve/
>
> Even Linux time gives inconsistent results:
>
>   root at lin mono_shootout # time mono sieve.exe 1000
>   Count: 1028
>
>   real    0m0.982s
>   user    0m0.920s
>   sys     0m0.030s
>
>   root at lin mono_shootout # time mono sieve.exe 1000
>   Count: 1028
>
>   real    0m0.977s
>   user    0m0.030s
>   sys     0m0.020s
>
>   root at lin mono_shootout # time mono sieve.exe 1000
>   Count: 1028
>
>   real    0m0.979s
>   user    0m0.920s
>   sys     0m0.020s
>
>   root at lin mono_shootout # time mono sieve.exe 1000
>   Count: 1028
>
>   real    0m0.978s
>   user    0m0.020s
>   sys     0m0.040
>
> Explanations and suggestions appreciated.
> (The shootout Perl script grabs user & sys times, forks, execs the mono
> program, and grabs user & sys times.)
>
>
>
>
> _______________________________
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
> http://promotions.yahoo.com/goldrush
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 




More information about the Mono-devel-list mailing list