Пример #1
0
        private static double MeasureDummyWith(int count)
        {
            var algo = new DummyWith();
            algo.Recursive(10);

            var sw = Stopwatch.StartNew();
            for (int i = 0; i < count; i++)
            {
                algo.Recursive(10);
            }

            sw.Stop();
            var duration = 1000.0 * sw.ElapsedTicks / Stopwatch.Frequency;

            return duration;
        }
Пример #2
0
        private static double MeasureDummyWith(int count)
        {
            var algo = new DummyWith();

            algo.Recursive(10);

            var sw = Stopwatch.StartNew();

            for (int i = 0; i < count; i++)
            {
                algo.Recursive(10);
            }

            sw.Stop();
            var duration = 1000.0 * sw.ElapsedTicks / Stopwatch.Frequency;

            return(duration);
        }