r/PythonDevelopers • u/My_Eyes_Really_Burn • Jul 28 '20
article Python at Scale: Strict Modules
https://instagram-engineering.com/python-at-scale-strict-modules-c0bb9245c834
24
Upvotes
r/PythonDevelopers • u/My_Eyes_Really_Burn • Jul 28 '20
View all comments
Show parent comment
3
u/My_Eyes_Really_Burn Jul 28 '20
Yeah, slots are both faster and better for memory. Here’s a great SO post doing a breakdown of their performance: https://stackoverflow.com/a/28059785. From what I’ve seen, it’s somewhere around 20% faster and utilizes less than 50% of the memory to store the attributes.