slow on HPUX, SunOS, fast on MS Win2K and Linux?

Martin v. Loewis martin at v.loewis.de
Thu Nov 7 10:20:04 EST 2002


Alex Martelli <aleax at aleax.it> writes:

> > Is there some reason python code which builds objects should be
> > notably slow on HPUX or SunOS? Some known code optimization problem?
> 
> Not known to me, but the symptom sounds very much like malloc
> is very slow on those platforms compared with malloc on the Intel
> hardware platforms you've confronting them with.  

The HP-UX malloc is reportedly *very* slow if multi-threading is
enabled. So unless you need threads, recompiling Python without thread
support might give significant improvements.

If, by "SunOS", you really mean "SunOS 4" (i.e. not Solaris), the same
strategy might help, as might upgrading to Solaris.

> You could try building 2.3a0 off CVS -- it has VERY substantial
> optimizations in terms of memory allocation and handling in
> particular -- or, even with 2.2.2, try to force it to be built to
> use pymalloc (I have not needed to do it so I'm not sure about the
> details, but I'd guess it would probably be some --with-what=ever at
> config), which is an optimized-for-Python memory allocation package.

While that option exists, I would advise against using it: pymalloc
was significantly improved before enabling it in 2.3.

Regards,
Martin




More information about the Python-list mailing list