[Tutor] memory management

David Ascher da@ski.org
Mon, 19 Apr 1999 09:31:32 -0700 (Pacific Daylight Time)


On Mon, 19 Apr 1999, Christian Tismer wrote:

> > Do what in reverse order?
> 
> I believe that trying to release objects in reverse order
> might be faster than in-order. At least I'm quite sure that
> it will not behave worse. Releasing objects by age is for
> sure a good guess. Python cannot know the object's age,
> but releasing list elements from back to front might
> more often be related to the object's age.

As with all optimization suggestions, the answer is: try it, profile it on
multiple machines with realistic usage patterns, and if it's really good,
submit it to Guido. I doubt you'll see a percentage point on any
well-designed OS with a realistic test, but feel free to prove me wrong.

Cheers,

--david