Excessive disc activity
- Posted by FredRansom Sep 04, 2009
- 1440 views
The following code failed to execute properly with eui.exe. It initiated so much disc activity that I had to reboot to stop it. After rebooting, I ran it through the Watcom compiler. It executed to completion, but slower than it should have due to excexxive disc activity. This is Euphoria 4 beta 2 running on Vista.
sequence res procedure Calc_it () atom sum atom beginning, ending puts (1, "Starting\n") sum = 0.0 beginning = time() for x = 0.0 to 10000.0 do sum = sum + cos(x) for y = 0.0 to 10000.0 do sum += sin(y) end for end for ending = time() res = sprintf("%d %g", {ending - beginning, sum}) puts(1, res) end procedure Calc_it () integer x x = getc(0)