Introduction

Let's take a look at what we'll learn about parallel algorithms in this section.

In the Parallel Algorithms chapter we learned how to speed up code by running it automatically on multiple threads. That chapter showed a few smaller examples and benchmarks. However, it would be a good idea to see more extensive applications and how they can benefit from parallelisation, so that’s where we turn to now.

In the next pages, 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. In the end, we’ll discuss problems that we found along the way and possible future enhancements.

In this chapter you’ll learn:

  • 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

Get hands-on with 1200+ tech skills courses.