
High Performance Python
by Micha Gorelick, Ian Ozsvald · first published 2014
22mentions
8recommended by
13HN commenters
2014–2025first – last mentioned
62% recommend38% neutral
Why HN recommends it
Covers how Python code runs on real hardware and how to speed it up, including tools like Numba and profiling; useful for Python developers who need their code to run faster.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.



* Effective Python This teaches 90 specific ways to be more Pythonic * Robust Python This teaches some architectural / implementation patterns for code bases larger than a script * High Performance Python How to get the most juice out of Python, including compiling
on “Ask HN: Which book would you recommend for learning Python in detail?” ↗Network speeds I don't know about, but the book "High Performance Python" comes pretty close to the description of "CSCI 4020: Writing Fast Code in Slow Languages". Check it out!
on “Computer Sciences Courses That Don't Exist, but Should” ↗I'll also note [self promo!] that I wrote on book on High Performance Python I've really enjoyed this book so far, so thanks!
on “Practical Data Science in Python” ↗Not sure if it counts, but High Performance Python[0] starts you out from the bottom explaining the hardware and how it has to process your code, and they go from there. It's a really good read, was recommended by a coworker and I haven't had issues reading…
on “Perl 6 Advent Calendar” ↗High Performance Python is a good book. https://www.oreilly.com/library/view/high-performance-python...
on “Python consumes a lot of memory – how to reduce the size of objects?” ↗That is great -- I had to cover the snake on "High Performance Python" when I would read it out loud for my 5 y.o. as he fell asleep.
on “A short history of the O’Reilly animals (2013)” ↗…and run molecular simulations for our numerical methods and simulations class, and people were writing their code in C/C++ and were blazing through it. I remember finding out about Numba through the High Performance Python O'Reilly book, and by just adding a single @jit decorator, my simulations were dramatically faster. Amazing stuff, honestly felt like black magic at the time.
on “Profiling your Numba code” ↗This has been an absolute game changer: https://github.com/pytries/marisa-trie (succinct trie with fast lookup and minimal RAM) Use case and more details in the wonderful book by Ian and Micha: High Performance Python
on “Ask HN: What are some unusual but useful Python libraries you've discovered?” ↗High Performance Python by Ian Ozsvald and Micha Gorelick - fairly outdated at this point, but still quite relevant (I believe the authors are working on a new edition).
on “Python consumes a lot of memory – how to reduce the size of objects?” ↗Serious Python is a short, quick overview of some higher-level concepts I wasn't aware of before. I'm working through High Performance Python at the moment, and it's a much more in-depth treatment of similar concepts. https://nostarch.com/seriouspython https://www.amazon.com/High-Performance-Python-Performant-Pr...
on “Python at Scale: Strict Modules” ↗…blog series on how he sped up word2vec to be faster than Google's original C code: http://radimrehurek.com/2013/09/deep-learning-with-word2vec-... I'll also note [self promo!] that I wrote on book on High Performance Python, if that's your cup of tea (and Radim wrote a section in it): http://shop.oreilly.com/product/0636920028963.do
on “Practical Data Science in Python” ↗…really meant for pure Python speed-ups, it gets rid of numpy specific inefficiencies. Personally I'm pretty excited to see a fresh JIT working its way into core CPython (I'm the co-author of O'Reilly's High Performance Python).
on “Python 3.11.0 final” ↗What's your plan for redframes? It looks really new? I'm the co-author of O'Reilly's High Performance Python so I'm always on the lookout for pandas alternatives. Are you looking at speed implications too? Bigger-than-RAM use cases? "Easier than pandas" only (which, of course, is totally huge in its own right)?
on “Python 3.11.0 final” ↗I'd argue a little differently. I'm co-author of O'Reilly's High Performance Python book and I've been teaching a course around this for years, often to quants. 1. Pandas if you stay in RAM, if the team and org already know this, but learn about reduced-ram types (eg float32 rather…
on “Modern Polars: an extensive side-by-side comparison of Polars and Pandas” ↗I've just finished writing "High Performance Python" for O'Reilly (due August), we have a chapter on Lessons from the Field and one chap talks about his successful many-machine roll out of a complex production system using PyPy for a 2* overall speed gain.…
on “The first stable release of PyPy3” ↗