[Shootout-list] flawed comparisons - internationalization

Isaac Gouy igouy2@yahoo.com
Wed, 1 Sep 2004 07:59:45 -0700 (PDT)


> 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



		
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now. 
http://messenger.yahoo.com