I have a Qt C++ program that process some data in a loop.
It appends each data processing result to the end of a text file. Data processing operations are placed in a loop, so the program can produce more that 800 results in a few seconds and write them one by one (i.e. separately).
I thought that so much I/O operations are not very good for computer's hard drive, so I organized an array where I store data processing results, and when array length is more than 200, the program appends it to file and clean, than the array becomes more that 200 again, and so on.
But I don't know exactly - is it really needed? Maybe it is just a waste of RAM and I should append data to text file without those arrays (buffers)? After all, the program writes the same amount of data, independently in which way it does.