public static void Main() { // Obtain the word list string wordList = Benchmark.Resources.Resources.WordList; string[] words = wordList.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries); RunMenu(new Pair <string, Action>[] { new Pair <string, Action>("Convex Hull", Benchmarks.ConvexHull), new Pair <string, Action>("Run unit tests of LeMP", Benchmarks.LinqVsForLoop), new Pair <string, Action>("Hashtrees (InternalSet) vs HashSet/Dictionary", () => Benchmarks.BenchmarkSets(words)), new Pair <string, Action>("Thread-local storage", Benchmarks.ThreadLocalStorage), new Pair <string, Action>("IEnumerator<T> vs Iterator<T>", Benchmarks.EnumeratorVsIterator), new Pair <string, Action>("GoInterface", GoInterfaceBenchmark.DoBenchmark), new Pair <string, Action>("CPTrie (strings)", () => CPTrieBenchmark.BenchmarkStrings(words)), new Pair <string, Action>("CPTrie (integers)", CPTrieBenchmark.BenchmarkInts), new Pair <string, Action>("Byte array access", Benchmarks.ByteArrayAccess), new Pair <string, Action>("AList benchmarks (with chart Form)", () => new ListBenchmarks { TestDLists = false, TestOther = false }.Run(EzChartForm.StartOnNewThread(true))), new Pair <string, Action>("All collection benchmarks (with chart Form)", () => new ListBenchmarks().Run(EzChartForm.StartOnNewThread(true))), }); }
private static void RunBenchmarks() { new ListBenchmarks().Run(EzChartForm.StartOnNewThread(true)); Benchmarks.ConvexHull(); // Obtain the word list string wordList = Resources.WordList; string[] words = wordList.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries); Benchmarks.LinqVsForLoop(); //Benchmarks.CountOnes(); Benchmarks.BenchmarkSets(words); Benchmarks.ThreadLocalStorage(); Benchmarks.EnumeratorVsIterator(); GoInterfaceBenchmark.DoBenchmark(); CPTrieBenchmark.BenchmarkStrings(words); CPTrieBenchmark.BenchmarkInts(); Benchmarks.ByteArrayAccess(); }