Can Slots in python be used to improve performance overhead in a class heavy script, or does it mainly impact memory usage?
Asked
Active
Viewed 175 times
0
-
They often go hand in hand. Less memory usage = more stuff that can fit in the processor's cache. Profile and find out for sure. – Colonel Thirty Two Oct 26 '14 at 23:52
-
1It should indeed improve both, but it also depends on what _else_ you're doing. Profile your code. – U2EF1 Oct 26 '14 at 23:52
-
Thanks, I'll do that. – KGS Oct 27 '14 at 00:13
-
This will help you further! https://stackoverflow.com/questions/472000/usage-of-slots – N Randhawa Aug 19 '16 at 14:21