Parallel Data Conversion
Explore how to enhance CSV data conversion by using C++17's parallel execution policies. Understand the need for preallocating vectors over back inserters to avoid threading issues. Learn to apply std::execution::par correctly with std::transform to improve performance by parallelizing independent data parsing operations.
We'll cover the following...
We'll cover the following...
Using std::execution::par
As previously discussed, we can add parallel execution to the place where we convert the data. We have lots of lines to parse, each parsing is independent.
Two things needed to change to the serial version
- we need