官术网_书友最值得收藏!

  • R High Performance Programming
  • Aloysius Lim William Tjhi
  • 387字
  • 2021-08-06 19:17:05

Chapter 1. Understanding R's Performance – Why Are R Programs Sometimes Slow?

R is a great tool used for statistical analysis and data processing. When it was first developed in 1993, it was designed as a tool that would teach data analysis courses. Because it is so easy to use, it became more and more popular over the next 20 years, not only in academia, but also in government and industry. R is also an open source tool, so its users can use it for free and contribute new statistical packages to the R public repository called the Comprehensive R Archive Network (CRAN). As the CRAN library became richer with more than 6,000 well-documented and ready-to-use packages at the time of writing this book, the attractiveness of R increased even further. In these 20 years, the volume of data being created, transmitted, stored, and analyzed, by organizations and individuals alike, has also grown exponentially. R programmers who need to process and analyze the ever growing volume of data sometimes find that R's performance suffers under such heavy loads. Why does R sometimes not perform well, and how can we overcome its performance limitations? This book examines the factors behind R's performance and offers a variety of techniques to improve the performance of R programs, for example, optimizing memory usage, performing computations in parallel, or even tapping the computing power of external data processing systems.

Before we can find the solutions to R's performance problems, we need to understand what makes R perform poorly in certain situations. This chapter kicks off our exploration of the high-performance R programming by taking a peek under the hood to understand how R is designed, and how its design can limit the performance of R programs.

We will examine three main constraints faced by any computational task—CPU, RAM, and disk input/output (I/O)—and then look at how these play out specifically in R programs. By the end of this chapter, you will have some insights into the bottlenecks that your R programs could run into.

This chapter covers the following topics:

  • Three constraints on computing performance—CPU, RAM, and disk I/O
  • R is interpreted on the fly
  • R is single-threaded
  • R requires all data to be loaded into memory
  • Algorithm design affects time and space complexity
主站蜘蛛池模板: 永春县| 文山县| 汪清县| 清远市| 杭州市| 丰县| 金塔县| 老河口市| 通辽市| 平凉市| 湘潭市| 区。| 施甸县| 万安县| 普宁市| 邛崃市| 杨浦区| 门源| 龙陵县| 米脂县| 太和县| 仁化县| 霍林郭勒市| 罗山县| 阿勒泰市| 泰州市| 晋江市| 象山县| 南丰县| 盐亭县| 筠连县| 新津县| 江永县| 皋兰县| 吉安县| 中宁县| 永顺县| 沙洋县| 赤水市| 水城县| 郸城县|