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.
<br><br>Alan.<br><br><div class="gmail_quote">On Nov 22, 2007 8:05 PM, Miguel de Icaza <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>> I've detected a performance hit on "plastic server" running on mono. I was<br>> actually shocked because when I checked something similar working with<br>> integers, Mono was actually faster than .NET. But it seems it is not the
<br>> case with strings.<br><br></div>This in particular is a test of performance of ToString as implemented<br>for Int32, whether that is the actual source of the problem or not is a<br>different matter.<br><br>What you are doing in this loop is creating a few thousand strings, I
<br>get the feeling that the GC here is playing a larger role. Since you<br>are killing the objects immediately, .NET might be able to just get rid<br>of them by doing a collection on the young generation. Mono's GC is a
<br>different GC.<br><br>Try keeping everything in an arraylist, that might help measure whether<br>the GC is having an impact.<br><div><div></div><div class="Wj3C7c">_______________________________________________<br>Mono-devel-list mailing list
<br><a href="mailto:Monofirstname.lastname@example.org">Monoemail@example.com</a><br><a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list