
python很容易学。你之所以阅读本书可能是因为你的代码现在能够正确运行,而你希望它能跑得更快。你可以很轻松地修改代码,反复地实现你的想法,你对这一点很满意。但能够轻松实现和代码跑得够快之间的取舍却是一个世人皆知且令人惋惜的现象。而这个问题其实是可以解决的。
有些人想要让顺序执行的过程跑得更快。有些人需要利用多核架构、集群,或者图形处理单元的优势来解决他们的问题。有些人需要可伸缩系统在保证可靠性的前提下酌情或根据资金多少处理更多或更少的工作。有些人意识到他们的编程技巧,通常是来自其他语言,可能不如别人的自然。
我们会在本书中覆盖所有这些主题,给出明智的指导去了解瓶颈并提出效率更高、伸缩性更好的解决方案。我们也会在本书中包含那些来自前人的战场故事,让你可以避免重蹈覆辙。
python很适合快速开发、生产环境部署,以及可伸缩系统。python的生态系统里到处都是帮你解决伸缩性的人,让你有更多时间处理那些更有挑战性的工作。
[第1章 理解高性能python
1.1.1 计算单元
1.1.2 存储单元
1.1.3 通信层
<a href="https://yq.aliyun.com/articles/96731/">1.2 将基本的元素组装到一起</a>
<a href="https://yq.aliyun.com/articles/96737/">1.3 为什么使用python</a>
[第2章 通过性能分析找到瓶颈
<a href="https://yq.aliyun.com/articles/96756/">2.2 julia集合的介绍</a>
<a href="https://yq.aliyun.com/articles/96780/">2.3 计算完整的julia集合</a>
<a href="https://yq.aliyun.com/articles/96793/">2.4 计时的简单方法——打印和修饰</a>
<a href="https://yq.aliyun.com/articles/96798/">2.5 用unix的time命令进行简单的计时</a>
<a href="https://yq.aliyun.com/articles/96808/">2.6 使用cprofile模块</a>
<a href="https://yq.aliyun.com/articles/96814/">2.7 用runsnakerun对cprofile的输出进行可视化</a>
<a href="https://yq.aliyun.com/articles/96827/">2.8 用line_profiler进行逐行分析</a>
<a href="https://yq.aliyun.com/articles/96841/">2.9 用memory_profiler诊断内存的用量</a>
<a href="https://yq.aliyun.com/articles/96855/">2.10 用heapy调查堆上的对象</a>
<a href="https://yq.aliyun.com/articles/96879/">2.11 用dowser实时画出变量的实例</a>
<a href="https://yq.aliyun.com/articles/96890/">2.12 用dis模块检查cpython字节码</a>
<a href="https://yq.aliyun.com/articles/96894/">2.13 在优化期间进行单元测试保持代码的正确性</a>
<a href="https://yq.aliyun.com/articles/96900/">2.14 确保性能分析成功的策略</a>
<a href="https://yq.aliyun.com/articles/96904/">2.15 小结</a>
第3章 列表和元组
第4章 字典和集合
第5章 迭代器和生成器
第6章 矩阵和矢量计算
第7章 编译成c
第8章 并发
第9章 multiprocessing模块
第10章 集群和工作队列
第11章 使用更少的ram
第12章 现场教训