All things equal what is the fastest way to output data to disk in C++?
- by user260197
I am running simulation code that is largely bound by CPU speed. I am not interested in pushing data in/out to a user interface, simply saving it to disk as it is computed.
What would be the fastest solution that would reduce overhead? iostreams? printf? I have previously read that printf is faster. Will this depend on my code and is it impossible to get an answer without profiling?
Edit:
Output data needs to be in text format, whether tab or comma separated. This will require formatting, precision, etc.
Running in Windows.