Python performance optimizations – __slots__ and namedtuples

Hey again, My first post about optimization will be about __slots__ and namedtuples. __slots__ __slots__ have two important effects: performance: A class that utilizes slots gains ~30% faster attri…


Reproducible Python Bytecode

Some Linux distributions (like Alpine and Arch Linux) are shipping something called “python bytecode” in their packages. It’s stored in .pyc files and is generated during the package build. They’re stored in __pycache__ folders and can be seen here: (more…)

Read more »