예제 #1
0
 public static void Main(String[] args)
 {
     if (GC.TryStartNoGCRegion(1 * 1024 * 1024))
     {
         pidigits m = new pidigits(Int32.Parse(args[0]));
         m.Run();
         GC.EndNoGCRegion();
     }
 }
예제 #2
0
    public static int Main(String[] args)
    {
        int length = args.Length == 0 ? 10 : Int32.Parse(args[0]);

        for (int i = 0; i < Iterations; i++)
        {
            pidigits p = new pidigits();
            p.Calculate(length, true);
        }
        return(100);
    }
예제 #3
0
    public static void Bench()
    {
        int length = 600;

        foreach (var iteration in Benchmark.Iterations)
        {
            using (iteration.StartMeasurement())
            {
                for (int i = 0; i < Iterations; i++)
                {
                    pidigits p = new pidigits();
                    p.Calculate(length);
                }
            }
        }
    }
예제 #4
0
    public static void Main(String[] args)
    {
        pidigits m = new pidigits(Int32.Parse(args[0]));

        m.Run();
    }
예제 #5
0
 public static void Bench()
 {
     int length = 600;
     foreach (var iteration in Benchmark.Iterations)
     {
         using (iteration.StartMeasurement())
         {
             for (int i = 0; i < Iterations; i++)
             {
                 pidigits p = new pidigits();
                 p.Calculate(length);
             }
         }
     }
 }
예제 #6
0
 public static int Main(String[] args)
 {
     int length = args.Length == 0 ? 10 : Int32.Parse(args[0]);
     for (int i = 0; i < Iterations; i++)
     {
         pidigits p = new pidigits();
         p.Calculate(length, true);
     }
     return 100;
 }
예제 #7
0
파일: pidigits.cs 프로젝트: xgray/dotnet
    //public static void Main(String[] args)
    //{
    //	var watch = System.Diagnostics.Stopwatch.StartNew();
    //	Run(args);
    //	Console.WriteLine("elapsed {0} ms", watch.ElapsedMilliseconds);
    //}

    public static void Run(String[] args)
    {
        pidigits m = args.Length > 0 ? new pidigits(Int32.Parse(args[0])) : new pidigits(10000);

        m.Run();
    }