Mastering Performant Code: Efficiency, Profiling and Data Structures in Python
En stock
1.59 kg
Sí
Nuevo
Amazon
- Why this book?
- Implementation-first: every concept is introduced by writing it, testing it, timing it. You don’t just read about AVL trees or Bloom filters—you ship them, with type hints and 100 % test coverage .
- Performance obsession: each chapter ends with side-by-side speed and memory tables so you can see exactly when a hand-rolled structure outpaces a Python built-in .
- Real-world focus: text-editor buffers, in-memory DBs and caching layers show up as worked examples, proving the techniques survive outside the REPL .
- What you’ll master
- CPython internals—how lists resize, how dict hashing really works, and the memory layout that makes some operations O(1)O(1) and others O(n)O(n) .
- Fifteen+ data structures built from scratch, from dynamic arrays through balanced trees to probabilistic filters, each wrapped in modern Python idioms (dataclasses, context managers, mypy-friendly types) .
- A profiler’s toolbox: timeit, cProfile, tracemalloc, plus statistical benchmarking harnesses you can drop into any codebase .
- Production optimisation moves—__slots__, object pools, Cython fall-backs, and a full deployment pipeline that bakes in performance tests and CI/CD hooks .
- How you’ll learn
- A repeatable seven-step chapter pattern (Motivation → Theory → Implementation → Tests → Benchmarks → Applications → Exercises) keeps the pace brisk yet structured .
- Over fifty graded exercises—many open-ended—push you to tweak growth factors, hunt memory leaks, and make thread-safe variants until the knowledge sticks .
- Zero external dependencies: the entire journey runs on the standard library so you spend time learning fundamentals, not wrangling installs .
IMPORT EASILY
By purchasing this product you can deduct VAT with your RUT number