Book Image

R High Performance Programming

Book Image

R High Performance Programming

Overview of this book

Table of Contents (17 chapters)
R High Performance Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. Multiplying Performance with Parallel Computing

In this chapter, we will learn how to write and execute a parallel R code, where different parts of the code run simultaneously. So far, we have learned various ways to optimize the performance of R programs running serially, that is in a single process. This does not take full advantage of the computing power of modern CPUs with multiple cores. Parallel computing allows us to tap into all the computational resources available and to speed up the execution of R programs by many times. We will examine the different types of parallelism and how to implement them in R, and we will take a closer look at a few performance considerations when designing the parallel architecture of R programs.

This chapter covers the following topics:

  • Data parallelism versus task parallelism

  • Implementing data parallel algorithms

  • Implementing task parallel algorithms

  • Executing tasks in parallel on a cluster of computers

  • Shared memory versus distributed memory...