[Mono-dev] ToString() performace in Mono

Alan McGovern alan.mcgovern at gmail.com
Thu Nov 22 16:09:33 EST 2007

On my system i got (about) an 8% improvement by passing by ref. The results
were fairly variable though, which makes an exact figure harder to give. The
difference was ~6500ms down to ~6000ms. It's not a huge, but it is roughly
in line with what i was expecting. I wouldn't be surprised though if the GC
was playing a big role in the performance.


On Nov 22, 2007 8:05 PM, Miguel de Icaza <miguel at novell.com> wrote:

> > I've detected a performance hit on "plastic server" running on mono. I
> was
> > actually shocked because when I checked something similar working with
> > integers, Mono was actually faster than .NET. But it seems it is not the
> > case with strings.
> This in particular is a test of performance of ToString as implemented
> for Int32, whether that is the actual source of the problem or not is a
> different matter.
> What you are doing in this loop is creating a few thousand strings, I
> get the feeling that the GC here is playing a larger role.   Since you
> are killing the objects immediately, .NET might be able to just get rid
> of them by doing a collection on the young generation.   Mono's GC is a
> different GC.
> Try keeping everything in an arraylist, that might help measure whether
> the GC is having an impact.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071122/a4f16241/attachment.html 

More information about the Mono-devel-list mailing list