Large Data Sets: Use base variables or classes? And some binding questions

Steven D'Aprano steve at
Sat Sep 27 01:43:57 CEST 2008

On Fri, 26 Sep 2008 14:54:36 -0700, Carl Banks wrote:

> However, it seems from the rest of your comments that speed is your main
> concern.  Last time someone reported __slots__ didn't make a big
> difference in access time, but it probably would speed up creating
> objects a bit.  

Carl probably knows this already, but for the benefit of the Original 

__slots__ is intended as a memory optimization, not speed optimization. 
If it speeds up creation, that's a serendipitous side-effect of using 
less memory.

> Of course, you should profile it to make sure.


Can I ask the OP how large is "large" in the Large Data Sets? What seems 
large to people is often not large at all a modern computer. 


More information about the Python-list mailing list