Quesion about the proper use of __slots__
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Mon Feb 20 04:40:42 EST 2006
In <1140426860.033363.237150 at o13g2000cwo.googlegroups.com>, Zefria wrote:
> Also, I don't generally do any optimization at all yet (as a highschool
> student projects get trashed often enough no to bother over), but in
> this special case I'm expecting each "carrier" to have up to 150
> fighters, and 3 to 5 carriers for each of the two teams, which comes
> out to be quite large.
That's 750 fighter objects. This is not a "large" amount of objects. So
I think it's premature optmization. Especially because you think of using
__slots__ without actually trying if the program uses too much memory.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list