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

Chapter 2. Profiling – Measuring Code's Performance

The first step to improve the performance of R programs is to identify where the performance bottlenecks are occurring. To do this, we profile or measure the performance of an R program as it runs with respect to various measures such as execution time, memory utilization, CPU utilization, and disk I/O. This gives us a good idea of how the program and its parts perform, so that we can tackle the biggest bottlenecks first. This chapter will show you how to use a few simple tools to measure the performance of R programs.

The 80/20 rule is applied here. 80 percent of the possible performance improvements can usually be achieved by tackling 20 percent of the largest performance problems. We will look at how to determine which problems to solve first in order to get maximum improvement in the least amount of time and effort.

This chapter covers the following topics:

  • Measuring the total execution time
  • Profiling the execution time
  • Profiling the memory utilization
  • Monitoring memory utilization, CPU utilization, and disk I/O using OS tools
  • Identifying and resolving bottlenecks
主站蜘蛛池模板: 嘉义市| 班戈县| 中江县| 甘孜县| 长汀县| 德钦县| 连云港市| 闵行区| 合水县| 福清市| 赤水市| 孝义市| 沈丘县| 邯郸县| 鄂伦春自治旗| 博爱县| 互助| 抚州市| 得荣县| 民乐县| 安新县| 托克逊县| 吉林市| 蛟河市| 任丘市| 忻州市| 盐城市| 平和县| 宜昌市| 巫溪县| 迭部县| 曲水县| 揭西县| 潮安县| 泉州市| 北川| 瑞昌市| 漳州市| 曲阳县| 大埔县| 年辖:市辖区|