コード例 #1
0
ファイル: Enumerable.cs プロジェクト: gtkatakura/roslyn
        public static void RunWordTest(string[] words1, string[] words2, int[][] scores, int runs)
        {
            Enumerate("xyzzy");
            Enumerate(("abcdefghijklmnopqrstuvwxyz", new int[] { }));
            var wt = new WordTest(words1, words2, scores, runs);

            var cenumerableShimTotalTime = wt.RunCEnumerableShim();

            Console.Out.WriteLine($"TOTAL (CEnumerable Shim):     {cenumerableShimTotalTime}s");

            var cenumerableForeachTotalTime = wt.RunCEnumerableForeach();

            Console.Out.WriteLine($"TOTAL (CEnumerable Foreach):  {cenumerableForeachTotalTime}s");

            var cenumerableUnrolledTotalTime = wt.RunCEnumerableUnrolled();

            Console.Out.WriteLine($"TOTAL (CEnumerable Unrolled): {cenumerableUnrolledTotalTime}s");
        }