Hacking PyLongObject on Python 3.2
summary
Examines internal changes to Python 3.2’s long integer implementation (PyLongObject), explaining how the object layout and algorithms differ from earlier versions. Describes practical hacking: reading the C source, modifying representation and operations, and rebuilding Python to test effects on performance and behavior.
AI-written summary · about
chapters (11)
- 0:00Python 3 integers
- 5:28PyLongObject structure
- 10:53Small integer optimizations
- 17:46Old vs new implementations
- 23:08Long to PyLongObject
- 29:28Implementation challenges
- 35:26Additional optimizations
- 39:04Theory versus practical limits
- 42:14Assembly for performance
- 47:09Structural changes pros/cons
- 51:29Q&A
related talks
31mPlaying with CPython Objects Internals
22mLow Level Python a Deep dive into the python sources
31mUnderstanding Python from the inside: C concepts to dive into CPython fearless
23mMemoirs of a Python Object: Memory Management and Improving Performance
38mDynamic Code Instrumentation with Hacked Interpreters
32mHow (not) to upgrade a platform
32mBytecode and .pyc files
31mIntroducing Immortal Objects: Building Block Towards a Multi-core Python Runtime
