GrandFather's right as far as IO being the dominant cost here.
So why not avoid the IO completely.
Rather than writing the numbers to disk and then reading them back to accumulate the sums and sum of squares, do the accumulation in the original process?
The cost of accumulating these in the original process will be far less than writing the values to disk.
In reply to Re^2: Optimizing a double loop
by BrowserUk
in thread Optimizing a double loop
by roibrodo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |