Full description not available
T**Y
Beware only python 2.7 .
No talk or mention of python 3. Numpy, Scipy, etc are already compatible with Python 3.x. , then why shy away?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.
J**N
Extremely helpful to speed up your code!
Bought this book to speed up code related to PDE solvers and Monte Carlo simulations. It was a huge help!
Z**S
Good survey of tools and methods to speed up your Python programs
One of the big draws of the Python programming language is that it is very easy to develop something relatively complex quite rapidly. However, Python is much more than a prototyping language, and this book is a great resource to help you think about how you approach problems in Python, as well as tracking down and improving bottlenecks in your code.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.
L**V
One of the best books I ever read on Python
One of the best books I ever read on Python, period. If you are a pythonista data scientist this is a must read - it explains neatly how to profile an application, how the Python interpreter works at the machine level (and therefore how to circumvent its limitations), asynchronous programming, multiprocessing, and much more. The book is replete with programming examples that allow the student to understand the concepts easily - and empower them with practical snippets.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.
M**C
Great for code optimization!
The authors give a really detailed overview of what is going when a piece of code is executed. It helped me to code more efficiently.
Z**T
A Highly Useful, Practical, and Well-Balanced Guide
All languages have their benefits and drawbacks. Conventional wisdom is that Python's main weakness is its slow speed, making it unsuitable for high-performance applications. This is true to the extent that if nanoseconds count, nothing's going to beat customized code in C++, Fortran, or assembly. But for the vast majority of applications, even "high performance" only entails getting somewhere in the ballpark of such highly-optimized code. And a small number of techniques in Python programming make huge performance increases possible with relatively little work."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.
Trustpilot
1 month ago
2 days ago