Question

I have a very simple program in Ruby that opens a dictionary file, sorted-words.txt and prints out all the words in pig-latin. I tested its speed, and the first time I ran it, the program finished in about 1.6 seconds. The second time I ran the program, it took about 2.1 seconds. Between the two runs, there was maybe about a 10 second wait, me looking at the results and running the program again. I waited a minute, ran it again, and it ran in 1.8 seconds. Although the variation is slight, it is still there. Why is there this variation?

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top