Performance tricks learned from low level developers
summary
Shows concrete, repeatable tricks: use Python bytecode disassembly to see expensive ops, replace repeated attribute lookups by assign hot methods to locals to avoid per-iteration dictionary searches, and reorder binary fields to respect data-type alignment (reordering saved gigabytes in large parses). Example: a binary parser handling ~3,842 transactions (~100 MB output, several hundred MB input) runs ~174 seconds before tuning and drops dramatically after removing those lookups and packing more efficiently. Also points out low-level idioms (e.g. XOR-zero) that inspired higher-level optimizations.
AI-written summary · about
chapters (7)
- 0:00Introduction and hacking history
- 11:08Why we stopped hacking
- 17:36Learning from low-level tricks
- 23:07Optimizing Python bytecode
- 31:55Memory alignment in Python
- 45:42Frameworks like a piece of paper
- 49:17Closing and call to action
related talks
30mWrite faster Python! Common performance anti patterns
24mHow two undergrads from the other side of the planet are speeding up...
32mWriting performant code for modern Python interpreters
28m"Performant Python"
25mAdvanced Python
32mProfiling at the speed of light
36mHow to Optimize your Python Program for Slowness
59mMyths and fairy tales around Python performance
