Skip to content

Commit

Permalink
Profiler restored.
Browse files Browse the repository at this point in the history
The iterative tests did not go well. Odd...
  • Loading branch information
Andre Van Der Merwe committed Apr 16, 2009
1 parent 133a18a commit 26b4c20
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions TTreeProfiler/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 105,7 @@ private static void CompareCollectionPerformance()
profiler.AddCombine( "add", 25 );
profiler.AddCombine( "search", 75 );

//int[][] ttreeOrders = new int[][] { new[] { 40, 43 }, new[] { 97, 100 }, new[] { 17, 20 }, new[] { 7, 10 }, new[] { 497, 500 }, new[] { 2000, 2003 }, };
int[][] ttreeOrders = new int[][] { new[] { 97, 100 }, new[] { 17, 20 }, new[] { 7, 10 }, new[] { 497, 500 }, new[] { 2000, 2003 }, };
int[][] ttreeOrders = new int[][] { new[] { 40, 43 }, new[] { 97, 100 }, new[] { 17, 20 }, new[] { 7, 10 }, new[] { 497, 500 }, new[] { 2000, 2003 }, };
List<TTreeRoot<string>> trees = new List<TTreeRoot<string>>();

for( int tpos = 0; tpos < ttreeOrders.Length; tpos )
Expand All @@ -121,7 120,7 @@ private static void CompareCollectionPerformance()
}


/*var list = new List<string>();
var list = new List<string>();
profiler.Add( "add", "List<>", i => Time( values, seconds, i.Desc " - " i.Group, s => list.Add( s ), values.Count, i ) );
profiler.Add( "search", "List<>", i => Time( values, seconds, i.Desc " - " i.Group, s => list.IndexOf( s ), list.Count - 1, i ) );

Expand All @@ -136,7 135,7 @@ private static void CompareCollectionPerformance()
var array = new string[ max ];
profiler.Add( "add", "array[]", i => Time( values, seconds, i.Desc " - " i.Group, s => array[ i.Count ] = s, values.Count, i ) );
profiler.Add( "search", "array[]", i => Time( values, seconds, i.Desc " - " i.Group, s => { var x = (from a in array where a == s select a).First(); }, array.Length - 1, i ) );
*/

profiler.Profile();
Console.WriteLine();
Console.WriteLine( "----" );
Expand Down

0 comments on commit 26b4c20

Please sign in to comment.