Buy new:
$68.46$68.46
FREE delivery:
Thursday, Nov 10
Ships from: Amazon Sold by: rose42
Buy used:: $15.91
Other Sellers on Amazon
99% positive over last 12 months
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required. Learn more
Read instantly on your browser with Kindle Cloud Reader.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the Authors
OK
High Performance Python: Practical Performant Programming for Humans 1st Edition
| Micha Gorelick (Author) Find all the books, read about the author, and more. See search results for this author |
| Ian Ozsvald (Author) Find all the books, read about the author, and more. See search results for this author |
There is a newer edition of this item:
Enhance your purchase
Your Python code may run correctly, but you need it to run faster. By exploring the fundamental theory behind design choices, this practical guide helps you gain a deeper understanding of Python’s implementation. You’ll learn how to locate performance bottlenecks and significantly speed up your code in high-data-volume programs.
How can you take advantage of multi-core architectures or clusters? Or build a system that can scale up and down without losing reliability? Experienced Python programmers will learn concrete solutions to these and other issues, along with war stories from companies that use high performance Python for social media analytics, productionized machine learning, and other situations.
- Get a better grasp of numpy, Cython, and profilers
- Learn how Python abstracts the underlying computer architecture
- Use profiling to find bottlenecks in CPU time and memory usage
- Write efficient programs by choosing appropriate data structures
- Speed up matrix and vector computations
- Use tools to compile Python down to machine code
- Manage multiple I/O and computational operations concurrently
- Convert multiprocessing code to run on a local or remote cluster
- Solve large problems while using less RAM
- ISBN-101449361595
- ISBN-13978-1449361594
- Edition1st
- PublisherO'Reilly Media
- Publication dateSeptember 30, 2014
- LanguageEnglish
- Dimensions7 x 0.75 x 9.25 inches
- Print length370 pages
Frequently bought together

Products related to this item
From the brand
-
-
Sharing the knowledge of experts
O'Reilly's mission is to change the world by sharing the knowledge of innovators. For over 40 years, we've inspired companies and individuals to do new things (and do them better) by providing the skills and understanding that are necessary for success.
Our customers are hungry to build the innovations that propel the world forward. And we help them do just that.
Editorial Reviews
About the Author
Micha Gorelick was the first man on Mars in 2023 and won the Nobelprize in 2046 for his contributions to time travel. He then went backto the 2000s to study Astronomy, teach scientific computing and workon data at bitly. Then he helped start Fast Forward Labs as a residentmad scientist. There he worked on many issues from machine learning toperformant stream algorithms. A monument celebrating his life can befound in Central Park, 1857.
Ian Ozsvald is a Data scientist and teacher at ModelInsight.io withover ten years of Python experience. He’s taught high performancePython at the PyCon and PyData conferences and has been consulting ondata science and high performance computing for years in the UK.
Product details
- Publisher : O'Reilly Media; 1st edition (September 30, 2014)
- Language : English
- Paperback : 370 pages
- ISBN-10 : 1449361595
- ISBN-13 : 978-1449361594
- Item Weight : 1.35 pounds
- Dimensions : 7 x 0.75 x 9.25 inches
- Best Sellers Rank: #751,322 in Books (See Top 100 in Books)
- #22 in Computer Performance Optimization
- #790 in Python Programming
- #1,308 in Software Development (Books)
- Customer Reviews:
About the authors

Micha Gorelick was the first woman on Mars in 2033 and won the Nobel Prize in 2056 for her contributions to time travel. After seeing the deplorable uses of her new technology, she traveled back in time to 2012 and convinced herself to quit her nascent research into time travel and follow her love of data. She has since cofounded Fast Forward Labs, an applied machine learning research lab, authored multiple papers on ethical computing and helped build the inclusive community space Community Forge in Wilkinsburg. In 2019 she cofounded Probable Models, an ethical machine learning group, which made the interactive immersive play "Project Amelia". In 2020 she can be found in France helping journalists at the OCCRP find stories in data. A monument celebrating her life can be found in Central Park, 1857.

Ian is a Chief Data Scientist and Coach, he co-organises the annual PyDataLondon conference with 700+ attendees and the associated 11,000+ member monthly meetup. He runs the established Mor Consulting Data Science consultancy in London, gives conference talks internationally often as keynote speaker and is the author of the bestselling O'Reilly book High Performance Python (2nd edition). He has 17 years of experience as a senior data science leader, trainer and team coach. For fun he's walked by his high-energy Springer Spaniel, surfs the Cornish coast and drinks fine coffee. Past talks and articles can be found at: https://ianozsvald.com/
Related products with free delivery on eligible orders Sponsored Hide feedback | Try Prime for unlimited fast, free shipping
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on Amazon-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
This book is definitely not going to teach you Python. There are many other tutorials and references out there to learn about the language, and this book assumes you are already a proficient Python programmer and will be able to read and understand the code examples they provide. This book is about tuning your Python code to run faster.
The progression of the chapters is very logical, and some of the same toy problems re-appear throughout the book as additional optimizations provide even greater efficiency improvements. The book introduces a large number of tools, and it mostly gives you an idea of what the tool is and why you might consider it. To really use any of the tools in practice, you'll want to reference online documentation, but this book gives you a good idea of where to start looking.
I was particularly interested in reading the "Clusters and Job Queues" chapter before I got the book, and it helped guide me to an IPython.parallel solution that fits my current problem quite nicely, as well as provide some other tools I may investigate in the future.
The authors recommend the Anaconda Python distribution by Continuum Analytics on several occasions, and I definitely agree. Some of the tools and techniques in the book use only the Standard Library, but most of the more advanced topics require external modules. Many of the modules referenced (numpy, Cython, Tornado, & IPython to name just a few) are included in the Anaconda distribution as one simple download.
This book's use is twofold. First, it is worth a full read-through for the discussion of the various things that tend to slow down Python code (or code in general) and what kinds of approaches you should be aware of. Second, it provides good, brief examples of many different tools in practice, as well as listing other recommended resources at the end of each chapter, allowing it to serve as a good reference text.
One point the authors make repeatedly is that you must consider the trade between code execution time and development velocity. Many of the things you can do to speed up your code with make it considerably harder to understand and work with in the future. It's important to always have proof that you are optimizing the right portions of code and that the benefits are worth it. They help you to look for the "big wins" where you can get drastic speed improvements with minimal effort and complexity.
Disclaimer: I received a free Ebook copy of this work under the O'Reilly Blogger Review Program. I also happened to like it so much that I bought a hard copy as well so I can have it on my reference shelf at work.
In the middle chapters the core language features are discussed and details of the standard Python implementation are explained. Global versus local space, and order of operations are discussed. These chapters provided excellent explanations of the performance characteristics of code samples.
The later chapters focused on external tools to Python which can provide speed ups. These sections felt a bit less organized than the beginning chapters and they sometimes deferred to online documentation. In certain cases the metrics seemed to have been tabulated quickly. For example there are many sentences like "Ian's laptop performed in X seconds". I would have preferred to see a little more analysis there.
A lot of the examples in the book are based off scientific algorithms. It worked okay since Python is used a lot in science, but I got lost in the details of what they were solving sometimes. On another occasion the authors used a method for prime number discovery that was inefficient, but they did this to demonstrate how a cluster or distributed system would work with this algorithm. Although the authors do mention many times it is better to speed up your algorithms than to look for premature optimizations.
I learned a decent amount from this book and it is a nice resource for improving your Python skills. Some material is getting a bit dated especially with regards to external libraries, but this is still probably the best book on the market for performance Python programming.
"High Performance Python" is an excellent, practical guide to implementing those performance increases. It's also a notable strength of this book that it focuses on how to get those performance increases without requiring complicated external libraries. Each time a tool is mentioned, there's a useful discussion of exactly when one does need, and does not need, that tool. When libraries such as NSQ (the discussion of which is excellent) are explained, the explanations are lucid, well-organized, and extremely practical. This is a really useful book for people who are trying to write solid, performant, production code in Python.
Teaches you how to squeeze out some juice out of the language and make it scale. Some explanation of the tools but also process of performance improvement.
I am now writing pretty efficient code in python for our machine learning pipelines and it is sufficiently fast, that I can stay in python and not worry about writing it into a lower level less flexible language.
This books teaches you how to use python at its best, makes you conscious and able to take care of what is going underneath the hood of your code!
Top reviews from other countries
The only drawback of the book is its reliance on Python2.7, especially in light of the superior support in Python3 for multiprocessing, but the authors are careful to highlight how to convert to Python3 if necessary and even discuss modules present in Python3 only.
All in all, grab it. It's absolutely worth the money and the time.
Nearly useless for me. Since being a graduate student in the physical sciences, all the packages with which I work have completely moved to Python 3.

