Re:Modern Python Performance Considerations
by BurningFrog on Thursday May 05, 2022 @11:08AM
(#31274332)
Where can I read about what kind of performance improvements `__slots__` brings?
[ Parent
| on HN ]
Re:Modern Python Performance Considerations
by WillDaSilva on Thursday May 05, 2022 @12:00PM
(#31275047)
The Python docs themselves is a good place to start: https://docs.python.org/3/reference/datamodel.html#slots
The Python wiki also has some good info about it: https://wiki.python.org/moin/UsingSlots
Re:Modern Python Performance Considerations
by disconnect3d on Friday May 06, 2022 @06:08AM
(#31283406)
Apart from the official docs, this video also explains the low level data layout (in CPython) that slots introduce: https://www.youtube.com/watch?v=Iwf17zsDAnY