Object turnover.

Ryan Zerby tahognome at gmail.com
Thu Dec 2 18:34:42 UTC 2004


Should I worry about having a program that makes a large number of
temporary objects? I made a little "Solar system" that has planets
going around a star (using polar coordinates,
offset from the star).. so, each step, I do something like:

planet position: (Point r: rho degree: theta) + self center.

This creates a lot of points that get discarded on the next iteration
of step. I can run several hundred planets before the slowdown becomes
unbearable. However, If this were a morph that
I planned on sharing, it might drain resources from other objects.

Should I worry about this object turnover, or is the system designed
to handle this high object turnover?   Just trying to get my head
around some of the issues of efficient squeak code..



More information about the Squeak-dev mailing list