I am developing a financial app that stores data in a file. I have noticed that text file i/o is pretty slow. If I switch to a binary format, how much faster will it be? 2x? 10x? I could write my own timing tests but I am hoping someone else has already done it. Thanks in advance.
Share
Thanks for your thoughts, but as I am looking for numbers I decided to run my own tests.
Here are my results:
The top four rows are times in seconds to write 100 numbers. The ratios are in the last two rows. So the answer is that it is between 14 and 62 times faster to write binary versus text. I did not test read performance.
For me this is good news and bad news. Good because I can speed up the i/o a lot, bad because dealing with binary files is a pain.