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

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
主站蜘蛛池模板: 平远县| 乌兰浩特市| 大竹县| 罗平县| 枞阳县| 隆安县| 方正县| 孟津县| 广汉市| 姚安县| 密山市| 安多县| 永春县| 咸丰县| 贡觉县| 门头沟区| 屏山县| 永德县| 汉川市| 紫阳县| 正安县| 玉溪市| 伊川县| 高淳县| 锡林浩特市| 广丰县| 林芝县| 时尚| 海林市| 元江| 鄱阳县| 容城县| 巴里| 临湘市| 历史| 天长市| 仁怀市| 南部县| 铅山县| 合作市| 临澧县|