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

Summary

Algorithmic optimization can improve how your application scales as we process increasingly large data. In this chapter, we demonstrated use-cases and running times of the most common data structures available in Python, such as lists, deques, dictionaries, heaps, and tries. We also covered caching, a technique that can be used to trade some space, in memory or on-disk, in exchange for increased responsiveness of an application. We also demonstrated how to get modest speed gains by replacing for-loops with fast constructs, such as list comprehensions and generator expressions.

In the subsequent chapters, we will learn how to improve performance further using numerical libraries such as numpy, and how to write extension modules in a lower-level language with the help of Cython.

主站蜘蛛池模板: 金沙县| 阳高县| 贵溪市| 葫芦岛市| 威宁| 周宁县| 东乡族自治县| 禹城市| 腾冲县| 丹巴县| 江津市| 从化市| 沂水县| 棋牌| 阿尔山市| 定兴县| 临泉县| 湖北省| 镇雄县| 胶州市| 辽阳市| 渭南市| 象山县| 南木林县| 阳春市| 呼和浩特市| 商南县| 华容县| 璧山县| 江都市| 濮阳市| 漳州市| 民乐县| 清流县| 彰化市| 株洲县| 盖州市| 石狮市| 玉林市| 仲巴县| 平定县|