[Baypiggies] Discussion for newbies/beginner night talks - test results

Dennis Reinhardt DennisR at dair.com
Fri Feb 16 00:08:06 CET 2007


At 02:21 PM 2/15/2007, Chad Netzer wrote:

>Dennis, you said in your example, "The final time.sleep(2000) is to
>allow time for garbage collection to reduce memory usage."  However,
>that certainly will have no effect with CPython, nor do operating
>system memory allocators work that way.


I read at http://docs.python.org/lib/module-gc.html where it says

         "tune the collection frequency"

and other statements on this page to mean that the garbage collector makes 
periodic sweeps of object references.  I do not see what the timing is.  I 
did provide for a window in this code so that if such a sweep resulted in 
lowering memory requirements, I had provided for time to go by.

Informal testing on a large system (not this toy example) where I set the 
gc collection interval to every minute did not materially affect the 
results.  In this toy example, I had experimented with explicit del() calls 
and took them out of the code as they made no improvement.

Dennis


  ---------------------------------
| Dennis    | DennisR at dair.com    |
| Reinhardt | http://www.dair.com |
  ---------------------------------



More information about the Baypiggies mailing list