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

Introduction

Although Python is generally known (a bit unfairly) as a slow language, it is possible to achieve very good performance with the right methods. This is the objective of this chapter and the next. This chapter describes how to evaluate (profile) what makes a program slow, and how this information can be used to optimize the code and make it more efficient. The next chapter will deal with more advanced high-performance computing methods that should only be tackled when the methods described here are not sufficient.

The recipes of this chapter are organized into three parts:

  • Time and memory profiling: Evaluating the performance of code
  • NumPy optimization: Using NumPy more efficiently, particularly with large arrays
  • Memory mapping with arrays: Implementing memory mapping techniques for out-of-core computations on huge arrays, notably with the HDF5 file format
主站蜘蛛池模板: 清丰县| 乡城县| 双城市| 玉山县| 安阳市| 泰来县| 昭苏县| 永顺县| 文水县| 屏山县| 锡林郭勒盟| 乌拉特后旗| 凤山市| 延川县| 象州县| 固原市| 红桥区| 平乡县| 青田县| 武强县| 沭阳县| 广宁县| 凯里市| 彭泽县| 资阳市| 隆化县| 吴川市| 海南省| 新余市| 陵川县| 临泽县| 江陵县| 望城县| 凤凰县| 滁州市| 遂溪县| 宝坻区| 开平市| 固安县| 渑池县| 潞城市|