Mastering Python High Performance
暫譯: 精通 Python 高效能
Fernando Doglio
- 出版商: Packt Publishing
- 出版日期: 2015-09-12
- 售價: $2,010
- 貴賓價: 9.5 折 $1,910
- 語言: 英文
- 頁數: 260
- 裝訂: Paperback
- ISBN: 1783989300
- ISBN-13: 9781783989300
-
相關分類:
Python、程式語言
-
相關翻譯:
Python 性能分析與優化 (Mastering Python High Performance) (簡中版)
海外代購書籍(需單獨結帳)
商品描述
Measure, optimize, and improve the performance of your Python code with this easy-to-follow guide
About This Book
- Master the do's and don'ts of Python performance programming
- Learn how to use exiting new tools that will help you improve your scripts
- A step-by-step, conceptual guide to teach you how to optimize and fine-tune your critical pieces of code
Who This Book Is For
If you're a Python developer looking to improve the speed of your scripts or simply wanting to take your skills to the next level, then this book is perfect for you.
What You Will Learn
- Master code optimization step-by-step and learn how to use different tools
- Understand what a profiler is and how to read its output
- Interpret visual output from profiling tools and improve the performance of your script
- Use Cython to create fast applications using Python and C
- Take advantage of PyPy to improve performance of Python code
- Optimize number-crunching code with NumPy, Numba, Parakeet, and Pandas
In Detail
Simply knowing how to code is not enough; on mission-critical pieces of code, every bit of memory and every CPU cycle counts, and knowing how to squish every bit of processing power out of your code is a crucial and sought-after skill. Nowadays, Python is used for many scientific projects, and sometimes the calculations done in those projects require some serious fine-tuning. Profilers are tools designed to help you measure the performance of your code and help you during the optimization process, so knowing how to use them and read their output is very handy.
This book starts from the basics and progressively moves on to more advanced topics. You'll learn everything from profiling all the way up to writing a real-life application and applying a full set of tools designed to improve it in different ways. In the middle, you'll stop to learn about the major profilers used in Python and about some graphic tools to help you make sense of their output. You'll then move from generic optimization techniques onto Python-specific ones, going over the main constructs of the language that will help you improve your speed without much of a change. Finally, the book covers some number-crunching-specific libraries and how to use them properly to get the best speed out of them.
After reading this book, you will know how to take any Python code, profile it, find out where the bottlenecks are, and apply different techniques to remove them.
Style and approach
This easy-to-follow, practical guide will help you enhance your optimization skills by improving real-world code.
商品描述(中文翻譯)
測量、優化並改善您的 Python 代碼性能的簡易指南
關於本書
- 掌握 Python 性能編程的注意事項
- 學習如何使用現有的新工具來改善您的腳本
- 逐步的概念性指南,教您如何優化和微調關鍵代碼片段
本書適合誰
如果您是一位希望提高腳本速度的 Python 開發者,或是想將技能提升到更高層次,那麼這本書非常適合您。
您將學到什麼
- 逐步掌握代碼優化,學習如何使用不同的工具
- 了解什麼是分析器(profiler)以及如何閱讀其輸出
- 解釋分析工具的視覺輸出並改善腳本性能
- 使用 Cython 創建使用 Python 和 C 的快速應用程序
- 利用 PyPy 改善 Python 代碼的性能
- 使用 NumPy、Numba、Parakeet 和 Pandas 優化數據運算代碼
詳細內容
僅僅知道如何編碼是不夠的;在關鍵任務的代碼中,每一位記憶體和每一個 CPU 週期都至關重要,知道如何從代碼中榨取每一點處理能力是一項關鍵且受追捧的技能。如今,Python 被用於許多科學項目,有時這些項目中的計算需要進行一些嚴格的微調。分析器是幫助您測量代碼性能並在優化過程中提供幫助的工具,因此知道如何使用它們並閱讀其輸出非常方便。
本書從基礎開始,逐步深入到更高級的主題。您將學習從分析到編寫實際應用程序的所有內容,並應用一整套旨在以不同方式改善它的工具。在此過程中,您將停下來了解 Python 中使用的主要分析器以及一些圖形工具,以幫助您理解其輸出。然後,您將從通用優化技術轉向 Python 特定的技術,覆蓋語言的主要結構,幫助您在不大改變的情況下提高速度。最後,本書涵蓋了一些針對數據運算的特定庫,以及如何正確使用它們以獲得最佳速度。
閱讀完本書後,您將知道如何對任何 Python 代碼進行分析,找出瓶頸所在,並應用不同的技術來消除它們。
風格與方法
這本易於遵循的實用指南將幫助您通過改善現實世界的代碼來提升您的優化技能。