Python高性能编程

Python高性能编程
内容简介:
本书共有12章,围绕如何进行代码优化和加快实际应用的运行速度进行详细讲解。本书主要包含以下主题:计算机内部结构的背景知识、列表和元组、字典和集合、迭代器和生成器、矩阵和矢量计算、并发、集群和工作队列等。最后,通过一系列真实案例展现了在应用场景中需要注意的问题。
作者简介:
Micha Gorelick在bitly公司从事与数据打交道的工作,并负责建立了快速前进实验室(Fast Forward Labs),研究从机器学习到高性能流算法领域的问题。
Ian Ozsvald是ModelInsight.io的数据科学家和教师,有着超过十年的编程,这几年一直在英国从事关于数据科学和高性能计算方面的咨询工作。
下载地址:
下载Python高性能编程
标签:
文章链接:https://www.dushupai.com/book-content-7558.html(转载时请注明本文出处及文章链接)
最新评论: 更多
  • 屋子里就我一个
    2020-05-23
    挺好的 有些地方代码缩进有点问题
  • Leonard
    2019-08-21
    没想到我也成了到处喷翻译的一员了。。。
  • 阳月
    2021-05-04
    给入门者群览众山之读物,讲得比较浅
最新书摘: 更多
  • 我很严肃的
    2015-03-12
    The Python interpreter does a lot of work to try to abstract away the underlying com‐ puting elements that are being used. At no point does a programmer need to worry about allocating memory for arrays, how to arrange that memory, or in what sequence it is being sent to the CPU. This is a benefit of Python, since it lets you focus on the algorithms that are being implemented. However, it comes at a huge performance cost.It is important to realize that at its core, Python is indeed running a set of very optimized instructions. The trick, however, is getting Python to perform them in the correct se‐ quence in order to achieve better performance....Python’s abstraction hurts any optimizations that rely on keeping the L1/ L2 cache filled with the relevant data for the next computation. T...
  • 我很严肃的
    2015-03-12
    Simply adding more cores to a CPU does not always speed up a program’s execution time. This is because of something known as Amdahl’s law. Simply stated, Amdahl’s law says that if a program designed to run on multiple cores has some routines that must run on one core, this will be the bottleneck for the final speedup that can be achieved by allocating more cores....Furthermore, a major hurdle with utilizing multiple cores in Python is Python’s use of a global interpreter lock (GIL). The GIL makes sure that a Python process can only run one instruction at a time, regardless of the number of cores it is currently using. This means that even though some Python code has access to multiple cores at a time, only one core is running a Python instruction at any given time....While this may...
  • 我很严肃的
    2015-03-12
    The main properties of interest in a computing unit are the number of operations it can do in one cycle and how many cycles it can do in one second. The first value is measured by its instructions per cycle (IPC),1 while the latter value is measured by its clock speed. These two measures are always competing with each other when new computing units are being made. ...Furthermore, while increasing clock speed almost immediately speeds up all programs running on that computational unit (because they are able to do more calculations per second), having a higher IPC can also drastically affect computing by changing the level of vectorization that is possible. Vectorization is when a CPU is provided with multiple pieces of data at a time and is able to operate on all of them at once. This s...
常见问题:
  • 《Python高性能编程》对实际应用有何帮助?

    《Python高性能编程》对实际应用帮助巨大。书中提供的优化技巧可直接应用于数据处理、科学计算等场景,帮助开发者显著提升程序运行速度,降低资源消耗,从而在高性能计算和大规模数据处理中取得更好的效果。
  • 《Python高性能编程》是否适合初学者?

    《Python高性能编程》更适合有一定Python基础的读者。虽然书中内容深入浅出,但涉及计算机底层结构和性能优化,对初学者可能稍显复杂。建议先掌握Python基础语法,再阅读此书以提升代码效率。
  • 《Python高性能编程》如何帮助优化代码?

    《Python高性能编程》通过讲解计算机底层原理、数据结构优化及高级编程技巧,帮助读者识别和解决性能瓶颈。书中提供了大量实例,展示如何改进列表、字典、迭代器等的使用方式,从而显著提升代码执行效率,减少资源消耗。
猜你喜欢: