更新时间:2021-07-16 20:07:36
coverpage
Mastering Python High Performance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Profiling 101
What is profiling?
The importance of profiling
What can we profile?
Memory consumption and memory leaks
The risk of premature optimization
Running time complexity
Profiling best practices
Summary
Chapter 2. The Profilers
Getting to know our new best friends: the profilers
line_profiler
Chapter 3. Going Visual – GUIs to Help Understand Profiler Output
KCacheGrind – pyprof2calltree
RunSnakeRun
Chapter 4. Optimize Everything
Memoization / lookup tables
Usage of default arguments
List comprehension and generators
ctypes
String concatenation
Other tips and tricks
Chapter 5. Multithreading versus Multiprocessing
Parallelism versus concurrency
Chapter 6. Generic Optimization Options
PyPy
Cython
How to choose the right option
Chapter 7. Lightning Fast Number Crunching with Numba Parakeet and pandas
Numba
The pandas tool
Parakeet
Chapter 8. Putting It All into Practice
The problem to solve
The initial code base
Index