You'd rather have a timer class. Your timing method isn't taking into consideration garbage collection and finalizer methods.
Here is an Example
class Timer
{
private DateTime startingTime;
// stores starting time of code being tested
private TimeSpan duration;
// stores duration of code being tested
public void startTime()
{
GC.Collect(); // force garbage collection
GC.WaitForPendingFinalizers();
/* wait until all heap contents finalizer methods have completed for removal of contents to be permanent */
startingTime = DateTime.Now;
// get current date/time
}
public void stopTime()
{
// .Subtract: TimeSpan subtraction
duration = DateTime.Now.Subtract(startingTime);
}
public TimeSpan result()
{
return duration;
}
}
Your code would then be something like
public void TimingDestructive()
{
Timer Time = new Timer();
Time.startTime();
DestructiveReverseDeveloped();
Time.stopTime();
Console.WriteLine("Time taken for Destructive Reverse of Developed : {0}ms",Time.result().TotalMilliseconds);
Console.WriteLine("---------------------------------------------------------");
And shouldn't you clone your Lists before performing your reversal methods? If you do plan to clone them, clone them right before starting your timer and reversal method.