Man, I wish there was an edit on a Mailing List. ANYWHO, I made my own string compare<div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">                </span>public static void Main()</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>List&lt;List&lt;string&gt;&gt; lists = new List&lt;List&lt;string&gt;&gt;();</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>Random r = new Random();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>for ( int i=0; i &lt; 4; i++ ) {</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>lists.Add( new List&lt;string&gt;() );</div><div>
<span class="Apple-tab-span" style="white-space:pre">                                </span>for ( int j=0; j &lt; 400000; j++ )</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>lists[i].Add( r.Next().ToString() );</div><div>
<span class="Apple-tab-span" style="white-space:pre">                        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>Stopwatch watch = new Stopwatch();</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>watch.Start();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>foreach ( List&lt;string&gt; list in lists )</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>list.Sort( (string a, string b) =&gt; {</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>string longer = a;</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>string shorter = b;</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>if ( a.Length &lt; b.Length ) {</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                                </span>longer = b;</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>shorter = a;</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>}</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>for ( int i=0; i &lt; shorter.Length; i++ ) {</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>if ( shorter[i] &lt; longer[i] )</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                                        </span>return -1;</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>else if ( shorter[i] &gt; longer[i] )</div><div><span class="Apple-tab-span" style="white-space:pre">                                                        </span>return 1;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>if ( a.Length == b.Length )</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>return 0;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>else</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>return 1;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>});</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>watch.Stop();</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>Console.WriteLine( watch.Elapsed );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>}</div>
<div><br></div><div>I&#39;m pretty sure that compare is good. But now I get</div><div><br></div><div>OUTPUT = 00:00:01.6366606</div><div><br></div><div>Then again, I could have messed up my compare so someone check it again for me. Its not the perfect solution, but its kinda cool that it might be right and faster than the original. XP Thinking about it, this might only work with English .... hmmm food for thought.</div>
<br><div class="gmail_quote">On Wed, Jul 21, 2010 at 4:06 AM, David S <span dir="ltr">&lt;<a href="mailto:buttink@gmail.com">buttink@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Ran the mono profiler which should be taken with a grain of salt but whatever<div><br></div><div>   2639<span style="white-space:pre-wrap">        </span>25.83 % Mono.Globalization.Unicode.CodePointIndexer:ToIndex (int)<div>
   1921<span style="white-space:pre-wrap">        </span>18.80 % Mono.Globalization.Unicode.SimpleCollator:CompareInternal (string,int,int,string,int,int,bool&amp;,bool&amp;,bool,bool,Mono.Globalization.Unicode.SimpleCollator/Context&amp;)</div>

<div>    824<span style="white-space:pre-wrap">        </span> 8.06 % Mono.Globalization.Unicode.SimpleCollator:GetContraction (string,int,int,Mono.Globalization.Unicode.Contraction[])</div><div>    505<span style="white-space:pre-wrap">        </span> 4.94 % Mono.Globalization.Unicode.MSCompatUnicodeTable:IsIgnorable (int,byte)</div>

<div>    354<span style="white-space:pre-wrap">        </span> 3.46 % Mono.Globalization.Unicode.SimpleCollator:Category (int)</div><div>    332<span style="white-space:pre-wrap">        </span> 3.25 % Mono.Globalization.Unicode.SimpleCollator:GetContraction (string,int,int)</div>

<div>    311<span style="white-space:pre-wrap">        </span> 3.04 % Mono.Globalization.Unicode.SimpleCollator:Compare (string,int,int,string,int,int,System.Globalization.CompareOptions)</div><div>    289<span style="white-space:pre-wrap">        </span> 2.83 % Mono.Globalization.Unicode.MSCompatUnicodeTable:Category (int)</div>

<div>    233<span style="white-space:pre-wrap">        </span> 2.28 % Mono.Globalization.Unicode.SimpleCollator:IsIgnorable (int,System.Globalization.CompareOptions)</div><div>    233<span style="white-space:pre-wrap">        </span> 2.28 % Mono.Globalization.Unicode.SimpleCollator:FilterOptions (int,System.Globalization.CompareOptions)</div>

<div>    227<span style="white-space:pre-wrap">        </span> 2.22 % Mono.Globalization.Unicode.SimpleCollator:GetExtenderType (int)</div><div>    178<span style="white-space:pre-wrap">        </span> 1.74 % Mono.Globalization.Unicode.SimpleCollator:Level1 (int)</div>

<div>    168<span style="white-space:pre-wrap">        </span> 1.64 % Mono.Globalization.Unicode.SimpleCollator:Level2 (int,Mono.Globalization.Unicode.SimpleCollator/ExtenderType)</div><div>    167<span style="white-space:pre-wrap">        </span> 1.63 % Mono.Globalization.Unicode.MSCompatUnicodeTable:HasSpecialWeight (char)</div>

<div>    156<span style="white-space:pre-wrap">        </span> 1.53 % Mono.Globalization.Unicode.MSCompatUnicodeTable:Level3 (int)</div><div>    156<span style="white-space:pre-wrap">        </span> 1.53 % mono()</div>
<div>    151<span style="white-space:pre-wrap">        </span> 1.48 % Mono.Globalization.Unicode.MSCompatUnicodeTable:Level2 (int)</div><div>    118<span style="white-space:pre-wrap">        </span> 1.15 % </div>
<div>    116<span style="white-space:pre-wrap">        </span> 1.14 % Mono.Globalization.Unicode.MSCompatUnicodeTable:Level1 (int)</div><div><br></div>Looks like MSCompatUnicodeTable, SimpleCollator, and CodePointIndexer are just going to town on it. Well, I don&#39;t have the mono source on this comp to look into it any further.</div>

<div><br></div><div>OH btw Im using Mono 2.4.4 :)</div><div><div></div><div class="h5"><div><br></div><div><div class="gmail_quote">On Wed, Jul 21, 2010 at 4:00 AM, David S <span dir="ltr">&lt;<a href="mailto:buttink@gmail.com" target="_blank">buttink@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I take it back..... DAM YOU MISSING ZERO.<div><br></div><div><div><span style="white-space:pre-wrap">                                </span>for ( int j=0; j &lt; 40000; j++ ) // missing a 0 &gt;.&gt;</div>

</div><div><br></div><div>Output = 00:00:39.8547202 LOL I got pwned.<div><div></div><div><br>
<br><div class="gmail_quote">On Wed, Jul 21, 2010 at 3:57 AM, David S <span dir="ltr">&lt;<a href="mailto:buttink@gmail.com" target="_blank">buttink@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


I think there is another problem that is hidden behind all the complexity of your program. I can tell you this, it isn&#39;t string comparer.<div><br></div><div><div>using System;</div><div>using System.Collections.Generic;</div>



<div>using System.Diagnostics;</div><div><br></div><div>namespace StringCompare</div><div>{</div><div><br></div><div><br></div><div><span style="white-space:pre-wrap">        </span>public class MainClass</div>
<div><span style="white-space:pre-wrap">        </span>{</div><div><br></div><div><span style="white-space:pre-wrap">                </span>public static void Main()</div><div><span style="white-space:pre-wrap">                </span>{</div>
<div><span style="white-space:pre-wrap">                        </span>List&lt;List&lt;string&gt;&gt; lists = new List&lt;List&lt;string&gt;&gt;();</div><div><span style="white-space:pre-wrap">                        </span>Random r = new Random();</div>
<div><span style="white-space:pre-wrap">                        </span>for ( int i=0; i &lt; 4; i++ ) {</div><div><span style="white-space:pre-wrap">                                </span>lists.Add( new List&lt;string&gt;() );</div><div>
<span style="white-space:pre-wrap">                                </span>for ( int j=0; j &lt; 40000; j++ )</div><div><span style="white-space:pre-wrap">                                        </span>lists[i].Add( r.Next().ToString() );</div><div>
<span style="white-space:pre-wrap">                        </span>}</div><div><span style="white-space:pre-wrap">                        </span>Stopwatch watch = new Stopwatch();</div><div><span style="white-space:pre-wrap">                        </span>watch.Start();</div>
<div><span style="white-space:pre-wrap">                        </span>foreach ( List&lt;string&gt; list in lists )</div><div><span style="white-space:pre-wrap">                                </span>list.Sort();</div><div><span style="white-space:pre-wrap">                        </span>watch.Stop();</div>



<div><span style="white-space:pre-wrap">                        </span>Console.WriteLine( watch.Elapsed );</div><div><span style="white-space:pre-wrap">                </span>}</div><div><span style="white-space:pre-wrap">        </span>}</div>
<div>}</div><div><br></div><div>OUTPUT = 00:00:03.1364747</div><div><br></div><div>That being said I think its how you set up your threading. It could very easily be how Mono handles Threads (sleeping and such). Honestly, I have no idea, but I am intrigued.</div>


<div><div></div><div>
<br><div class="gmail_quote">On Wed, Jul 21, 2010 at 3:31 AM, Stifu <span dir="ltr">&lt;<a href="mailto:stifu@free.fr" target="_blank">stifu@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<br>
No release date, but Miguel recently said [1] &quot;6-8 weeks from now.&quot;<br>
No idea how it compares with the .NET GC.<br>
<br>
[1] <a href="http://tirania.org/blog/archive/2010/Jul-14.html" target="_blank">http://tirania.org/blog/archive/2010/Jul-14.html</a><br>
<div><div></div><div><br>
<br>
Mike Christensen-2 wrote:<br>
&gt;<br>
&gt; Is there a release date for 2.8?<br>
&gt;<br>
&gt; Also, how does the 2.8 GC (I realize it&#39;s only a beta) compare with the<br>
&gt; .NET GC?<br>
&gt;<br>
&gt; Mike<br>
&gt;<br>
&gt; On Tue, Jul 20, 2010 at 11:19 PM, Stifu &lt;<a href="mailto:stifu@free.fr" target="_blank">stifu@free.fr</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; There has been performance improvements since Mono 2.0. You may get<br>
&gt;&gt; better<br>
&gt;&gt; results with Mono 2.6. Or if you&#39;re not in a hurry, wait for Mono 2.8<br>
&gt;&gt; which<br>
&gt;&gt; should come out soon (that way you could also check out performances with<br>
&gt;&gt; the new GC).<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <a href="http://mono.1490590.n4.nabble.com/String-comparisons-slow-tp2296525p2296643.html" target="_blank">http://mono.1490590.n4.nabble.com/String-comparisons-slow-tp2296525p2296643.html</a><br>
&gt;&gt; Sent from the Mono - General mailing list archive at Nabble.com.<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Mono-list maillist  -  <a href="mailto:Mono-list@lists.ximian.com" target="_blank">Mono-list@lists.ximian.com</a><br>
&gt;&gt; <a href="http://lists.ximian.com/mailman/listinfo/mono-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-list</a><br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; Mono-list maillist  -  <a href="mailto:Mono-list@lists.ximian.com" target="_blank">Mono-list@lists.ximian.com</a><br>
&gt; <a href="http://lists.ximian.com/mailman/listinfo/mono-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-list</a><br>
&gt;<br>
&gt;<br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://mono.1490590.n4.nabble.com/String-comparisons-slow-tp2296525p2296702.html" target="_blank">http://mono.1490590.n4.nabble.com/String-comparisons-slow-tp2296525p2296702.html</a><br>




</font><div><div></div><div>Sent from the Mono - General mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Mono-list maillist  -  <a href="mailto:Mono-list@lists.ximian.com" target="_blank">Mono-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-list</a><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>