Search code examples
c#listtimestopwatch

Changing execution time of program


I have a program that takes a text file, read each line and then insert each line to a list. I used stopwatch to calculate time of execution. But there is some droll result! I'll give various elapsed time when I run the program each time (difference is about 1 or 2 seconds).

The text file involves 3 million URLs.

Any idea??!


Solution

  • Some fluctuation is perfectly normal, especially when the code involves IO such as reading files.