mallopt (Re: [Python-Dev] Minor compilation problem on HP-UX (1.6b1) (fwd))

Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Mon, 7 Aug 2000 14:59:49 +0200 (CEST)


Jack Jansen wrote:
> 
> 
> > + #ifdef __hpux
> > +       mallopt (M_MXFAST, 512);
> > + #endif /* __hpux */
> > + 
> 
> After reading this I went off and actually _read_ the mallopt manpage for the 
> first time in my life, and it seems there's quite a few parameters there we 
> might want to experiment with. Besides the M_MXFAST there's also M_GRAIN, 
> M_BLKSIZ, M_MXCHK and M_FREEHD that could have significant impact on Python 
> performance. I know that all the tweaks and tricks I did in the MacPython 
> malloc implementation resulted in a speedup of 20% or more (including the 
> cache-aligment code in dictobject.c).

To start with, try the optional object malloc I uploaded yestedray at SF.
[Patch #101104]

Tweaking mallopt and getting 20% speedup for some scripts is no surprise
at all. For me <wink>. It is not portable though.

-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252