Partners: KDAB Whole Tomato Software CppDepend

27 March 2017

Windows File Tests

Transform a file on Windows

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?

The articles:

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.

Get my free ebook about C++17!

More than 50 pages about the new Language Standard.

C++17 in detail, by Bartlomiej Filipek

For now I don't have my own courses, but I promote others :) (Warning: I'll also get a little commission for every signup). Have a look my recommended C++ courses at @Pluralsight (more info in my Resource page):

© 2017, Bartlomiej Filipek, Blogger platform
Any opinions expressed herein are in no way representative of those of my employers.
This site contains ads or referral links, which provide me with a commission. Thank you for your understanding.