We have learned a lot about the building blocks of functional programming, how to write them in C++, and how to use them to build function-centric design. It's time to look at a few specialized topics strongly related to functional programming.
First, we'll dive into the huge topic of performance optimization. We'll learn a few optimization techniques that fit particularly well with pure functions (for example, memoization and tail recursion optimization). We will look at both memory footprint and execution time optimization, carry out many measurements, and compare approaches.
Then, we will look into how functional programming enables parallel and asynchronous execution. Immutability leads to the avoidance of shared state, therefore, to simpler patterns of parallel execution.
But we can take advantage of...