Skip to Content
Mastering Large Datasets with Python
book

Mastering Large Datasets with Python

by John Wolohan
January 2020
Intermediate to advanced content levelIntermediate to advanced
312 pages
10h 22m
English
Manning Publications
Content preview from Mastering Large Datasets with Python

Chapter 6. Speeding up map and reduce with advanced parallelization

This chapter covers

  • Advanced parallelization with map and starmap
  • Writing parallel reduce and map reduce patterns
  • Accumulation and combination functions

We ended chapter 5 with a paradoxical situation: using a parallel method and more compute resources was slower than a linear approach with fewer compute resources. Intuitively, we know this is wrong. If we’re using more resources, we should at the very least be as fast as our low-resource effort—hopefully we’re faster. We never want to be slower.

In this chapter, we’ll take a look at how to get the most out of parallelization in two ways:

  1. By optimizing our use of parallel map
  2. By using a parallel reduce

Parallel map

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Analytics with Spark Using Python, First edition

Data Analytics with Spark Using Python, First edition

Jeffrey Aven

Publisher Resources

ISBN: 9781617296239Publisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link