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

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.

主站蜘蛛池模板: 永登县| 自贡市| 吉安县| 湖州市| 文水县| 曲靖市| 邛崃市| 友谊县| 绥德县| 新宁县| 迁安市| 芜湖市| 内江市| 云阳县| 沧源| 陇西县| 墨脱县| 桓仁| 华安县| 顺昌县| 洛阳市| 监利县| 宜兰县| 全州县| 鹤峰县| 抚松县| 托克逊县| 黄龙县| 姜堰市| 康马县| 科技| 临潭县| 呼和浩特市| 花莲县| 西乌珠穆沁旗| 屏山县| 南阳市| 门源| 西乡县| 重庆市| 威宁|