Large Data Sets: Use base variables or classes? And some binding questions
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Fri Sep 26 19:43:57 EDT 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
Poster:
__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.
Absolutely.
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.
--
Steven
More information about the Python-list
mailing list