Ejemplo n.º 1
0
    private static void SortMethodPerformanceTest(SortMethod sortMethod)
    {
        double[] y_sorted = y.Clone() as double[];
        double[] x_sorted = x.Clone() as double[];
        var      sw       = new Stopwatch();

        sw.Start();
        sortMethod.Invoke(x_sorted, y_sorted);
        sw.Stop();

        Console.WriteLine(
            string.Format(
                "{0} : {1}",
                sortMethod.Method.Name,
                sw.Elapsed));
    }