Windows File Tests
You want to transform one file into another, input into output. What API will you choose on Windows? WinApi? C++ Streams or good old stdio?
Last year in September I looked at four ways of processing a file on
Windows. Also, I did some performance tests.
The whole project description was recently published in Visual Studio Magazine.
The idea was relatively straightforward: I’d like to transform data from one file and write that into another file. The transformation method wasn’t important (it could be just a copy or encryption). I was interested how can you achieve that using Apis: C++ streams, C stdio, WinApi basic and WinApi memory mapped files.
After I had built the whole processing code, I was able to test the performance. What API was the fastest? How do you think? What was the easiest to use?
And there’s also GitHub repo with all sources: fenbf/WinFileTests
In the future it might be worth to try using multiple threads and see what are the benefits.
Please have a look at the articles and let me know what you think.