private static void SameTimeBigList() { SameTime sameTime = new SameTime( ); TimeDiffCalculator timerDiff = new TimeDiffCalculator("Big"); timerDiff.Start(); sameTime.IsFirstElementNull(ListOfOneMillonItems); timerDiff.Finish(); }
private static void SameTimeTestSmallList() { SameTime sameTime = new SameTime(); TimeDiffCalculator timerDiff = new TimeDiffCalculator("Small"); timerDiff.Start(); sameTime.IsFirstElementNull(ListOfHundredThousandItems); timerDiff.Finish(); }
private static void GrowLinearly2() { PerformanceGrowLinearly performanceGrowLinearly = new PerformanceGrowLinearly(); TimeDiffCalculator timerDiff = new TimeDiffCalculator("GrowLinearly2"); timerDiff.Start(); bool ItemFound = performanceGrowLinearly.ContainsValue(ListOfOneMillonItems, "Item999999"); timerDiff.Finish(); if (ItemFound == true) { Console.WriteLine("Item999999 exist."); } }
private static void SquareOfTheSize2() { O_N2_ performanceGrowLinearly = new O_N2_(); TimeDiffCalculator timerDiff = new TimeDiffCalculator("SquareOfTheSize2"); ListOfOneMillonItems[999998] = "Item888888"; timerDiff.Start(); bool isDuplicated = performanceGrowLinearly.ContainsDuplicates(ListOfOneMillonItems); timerDiff.Finish(); if (isDuplicated) { Console.WriteLine("Item duplicated"); } else { Console.WriteLine("Item not duplicated"); } }