Program very slow to finish

Roeland Rengelink r.b.rigilink at chello.nl
Mon Nov 5 20:06:41 EST 2001


Tim Peters wrote:
> 
> 
> I can't make time for it now, but "someone should" try this test using
> Vladimir Marangozov's PyMalloc package (shipped with Python 2.1 but turned
> off by default -- see the 2.1 NEWS file).
> 

Well, aint that nice

2.2b1 --with-pymaloc

size:   10000, creation: 29.94, destruction:  0.61
size:   20000, creation: 30.10, destruction:  0.64
size:   50000, creation: 30.73, destruction:  0.71
size:  100000, creation: 30.72, destruction:  0.68
size:  200000, creation: 30.95, destruction:  0.69
size:  500000, creation: 30.62, destruction:  0.67
size: 1000000, creation: 30.71, destruction:  0.68

malloc is faster too ;)

>From the NEWS file

An optional object allocator has been included.  This allocator is
optimized for Python objects and should be faster and use less memory
than the standard system allocator.  It is not enabled by default
because of possible thread safety problems.  The allocator is only
protected by the Python interpreter lock and it is possible that some
extension modules require a thread safe allocator.  The object
allocator can be enabled by providing the "--with-pymalloc" option to
configure.

Are extension modules in the Python std library affected?

Thanks for all the help,

Roeland
(Who's never used a dict with more than 1000 items in 'real' code)

-- 
r.b.rigilink at chello.nl

"Half of what I say is nonsense. Unfortunately I don't know which half"



More information about the Python-list mailing list