Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • R High Performance Programming
  • Toc
  • feedback
R High Performance Programming

R High Performance Programming

By : Aloysius Shao Qin Lim, Tjhi W Chandra
4.4 (14)
close
R High Performance Programming

R High Performance Programming

4.4 (14)
By: Aloysius Shao Qin Lim, Tjhi W Chandra

Overview of this book

This book is for programmers and developers who want to improve the performance of their R programs by making them run faster with large data sets or who are trying to solve a pesky performance problem.
Table of Contents (12 chapters)
close
11
Index

Optimizing parallel performance


Throughout the examples in this chapter, we saw various factors that affect the performance of parallel code.

One overhead in running a parallel R code is in setting up the cluster. By default, makeCluster() instructs the worker processes to load the methods package when they start. This can take a good amount of time, so if the task to be run does not require methods, this behavior can be disabled by passing methods=FALSE to makeCluster().

One of the biggest obstacles to parallel performance is the copying and transmission of data between the master process and the worker process. This obstacle can be large when you run parallel tasks on a cluster of computers, as many factors such as limited network bandwidth, and data encryption slow down the transmission of data even before any computations can be done. Even on a single computer, unnecessary copying of data in memory takes up precious seconds that can multiply as the data grows. This can also happen the...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete