Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
R High Performance Programming

You're reading from  R High Performance Programming

Product type Book
Published in Jan 2015
Publisher
ISBN-13 9781783989263
Pages 176 pages
Edition 1st Edition
Languages

Table of Contents (17) Chapters

R High Performance Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Understanding R's Performance – Why Are R Programs Sometimes Slow? Profiling – Measuring Code's Performance Simple Tweaks to Make R Run Faster Using Compiled Code for Greater Speed Using GPUs to Run R Even Faster Simple Tweaks to Use Less RAM Processing Large Datasets with Limited RAM Multiplying Performance with Parallel Computing Offloading Data Processing to Database Systems R and Big Data Index

Calculating values on the fly instead of storing them persistently


While executing an R program, it is sometimes convenient to cache all the data needed by the program, including the results of intermediate computations into a RAM prior to execution. During the execution, as and when the program needs to access any part of the data, it can be done very rapidly as all the data has been loaded into the R workspace. Caching intermediate results in RAM can save computational time significantly, especially when they are accessed frequently, as unnecessary recalculation of the data is avoided.

This is not a problem when the cached data can fit into RAM. However, it becomes a problem when there is not enough memory space to contain the data. The good news is, in many cases, the program does not need all parts of the data at the same time. One solution is to swap in and out portions of the data between RAM and the hard disk. Because disk I/O is slow, as we have established in Chapter 1, Understanding...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}