static void Main(String[] args) { try { var cmd = new Command(); cmd.Parse(args); var source = new SortData(cmd.SortCase); var entries = cmd.Length.HasValue ? source.BuildEntries(cmd.Length.Value) : default; var timer = new SortTimer <Int32>(); timer.Sort(entries, cmd.Print, cmd.Trials, cmd.InsertionLimit, cmd.Merges); } catch (ApplicationException ex) { Console.WriteLine(ex.Message); } catch (Exception ex) { Console.WriteLine(ex); } #if DEBUG Console.Write("Press Enter"); Console.ReadLine(); #endif }
static void Main(String[] args) { try { var cmd = new Command(); cmd.Parse(args); // //[Note]SortCase.Random ran about 4X faster over // 108M entries under the Tripartite conditional // var source = new SortData(cmd.SortCase); var entries = cmd.Length.HasValue ? source.BuildEntries(cmd.Length.Value) : default; var timer = new SortTimer <Int32>(); timer.Sort(entries, cmd.Print, cmd.Trials, cmd.InsertionLimit); } catch (ApplicationException ex) { Console.WriteLine(ex.Message); } catch (Exception ex) { Console.WriteLine(ex); } #if DEBUG Console.Write("Press Enter"); Console.ReadLine(); #endif }