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.
I've prepared a valuable bonus if you're interested in Modern C++!
Learn all major features of recent C++ Standards!
Check it out here:
- Google benchmark library
- Micro benchmarking libraries for C++
- Vector of object vs Vector of pointers
- Digging into SOIL Library for OpenGL
- FPS limit