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

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
主站蜘蛛池模板: 北海市| 中宁县| 鲁甸县| 海安县| 济源市| 龙门县| 嘉兴市| 海门市| 报价| 峨山| 阳江市| 赤壁市| 交城县| 台北县| 九江市| 丹东市| 抚顺县| 岫岩| 凭祥市| 西城区| 增城市| 丰宁| 临海市| 乐平市| 丘北县| 东城区| 双鸭山市| 高平市| 湖南省| 雅江县| 玛沁县| 安多县| 固原市| 碌曲县| 台湾省| 东丰县| 宁河县| 花莲县| 克拉玛依市| 沾化县| 莱州市|