コード例 #1
0
ファイル: LowLevelPerf.cs プロジェクト: wade1990/performance
        public int SealedClassInterfaceMethod()
        {
            SealedClass aSealedClass = aSealedClassField;

            int x = 0;

            for (int i = 0; i < InnerIterationCount; i++)
            {
                x = aSealedClass.InterfaceMethod();
            }

            return(x);
        }
コード例 #2
0
        public static void SealedClassInterfaceMethod()
        {
            SealedClass aSealedClass = new SealedClass();

            foreach (var iteration in Benchmark.Iterations)
            {
                using (iteration.StartMeasurement())
                    for (int i = 0; i < Benchmark.InnerIterationCount; i++)
                    {
                        aSealedClass.InterfaceMethod();
                    }
            }
        }
コード例 #3
0
ファイル: LowLevelPerf.cs プロジェクト: wade1990/performance
 public void SetupSealedClassInterfaceMethod() => aSealedClassField = new SealedClass();