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

Introduction

Although Python is not generally considered one of the fastest language (which is somewhat unfair), it is possible to achieve excellent performance with the appropriate 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 your 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
主站蜘蛛池模板: 吉木萨尔县| 平安县| 子长县| 张北县| 邯郸县| 察雅县| 洛阳市| 安义县| 固安县| 慈利县| 海安县| 三原县| 太仓市| 汉中市| 苏尼特右旗| 石泉县| 扎赉特旗| 卓尼县| 南陵县| 宝兴县| 平山县| 南开区| 灯塔市| 中方县| 福贡县| 临潭县| 雅安市| 佛冈县| 漯河市| 深圳市| 浦城县| 黄梅县| 安丘市| 通山县| 霞浦县| 华亭县| 平和县| 泗阳县| 平遥县| 澄迈县| 盖州市|