Program very slow to finish

Alexei Zverovitch none at nowhere.invalid
Tue Nov 6 11:59:54 CET 2001


Fred <fredNo at nospamco.com> wrote in news:3BE41CBE.94AED22 at nospamco.com:

> Python 2.1.1 (#3, Oct 25 2001, 12:54:40) [C] on osf1V4

Since you're running Digital Unix, you might want to
try tweaking the __fast_free_max et al variables used
by the system malloc(). 'man malloc' is your friend
(I believe you'll need to re-link the python executable
if you want to change those variables).

We've had a similar problem recently when a (C++)
program was taking ages to free() .5 million small
structures. It turned out that most of the time was
spent by free() coalescing memory blocks as they
were being deallocated. Increasing __fast_free_max
solved the problem (IIRC the execution time was
reduced by several orders of magnitude).

You may be seeing the same (or similar) behaviour.

Cheers
Alexei
--
alexei (at) barclays (dot) net



More information about the Python-list mailing list