Would do it the same way?
How to Parallelise CSV Reader - C++17 in Practice
by Bartlomiej Filipek
Friom the article:
At C++Stories (and in my C++17 book) you can find several articles on Parallel Algorithms introduced in C++17. The examples included in those posts were usually relatively straightforward. How about writing something larger?
In this text, you’ll see how to build a tool that works on CSV files, parses lines into sales records and then performs calculations on the data.
You’ll see how easy it is to add parallel execution to selected algorithms and have a performance improvement across the whole application (for example 4.5x on 6 cores, including file loading). In the end, we’ll discuss problems that we found along the way and possible future enhancements.
Here’s the plan:
- How to build an application that loads CSV files
- How to efficiently use parallel algorithms
- How to use std::filesystem library to gather required files
- How to use other C++17 library features like std::optional, conversion routines - std::from_chars and string_view
- Where to add [[nodiscard]] and improve code readability
Let’s go...
Add a Comment
Comments are closed.