[Python-Dev] Minor compilation problem on HP-UX (1.6b1) (fwd)
Moshe Zadka
Moshe Zadka <moshez@math.huji.ac.il>
Mon, 7 Aug 2000 14:45:45 +0300 (IDT)
I've answered him personally about the first part -- but the second part
is interesting (and even troubling)
--
Moshe Zadka <moshez@math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez
---------- Forwarded message ----------
Date: Mon, 7 Aug 2000 08:59:30 +0000 (UTC)
From: Eddy De Greef <degreef@imec.be>
To: python-list@python.org
Newsgroups: comp.lang.python
Subject: Minor compilation problem on HP-UX (1.6b1)
Hi,
when I compile version 1.6b1 on HP-UX-10, I get a few compilation errors
in Python/getargs.c (undefined UCHAR_MAX etc). The following patch fixes this:
------------------------------------------------------------------------------
*** Python/getargs.c.orig Mon Aug 7 10:19:55 2000
--- Python/getargs.c Mon Aug 7 10:20:21 2000
***************
*** 8,13 ****
--- 8,14 ----
#include "Python.h"
#include <ctype.h>
+ #include <limits.h>
int PyArg_Parse Py_PROTO((PyObject *, char *, ...));
------------------------------------------------------------------------------
I also have a suggestion to improve the speed on the HP-UX platform.
By tuning the memory allocation algorithm (see the patch below), it is
possible to obtain a speed improvement of up to 22% on non-trivial
Python scripts, especially when lots of (small) objects have to be created.
I'm aware that platform-specific features are undesirable for a
multi-platform application such as Python, but 22% is quite a lot
for such a small modification ...
Maybe similar tricks can be used on other platforms too.
------------------------------------------------------------------------------
*** Modules/main.c.orig Mon Aug 7 10:02:09 2000
--- Modules/main.c Mon Aug 7 10:02:37 2000
***************
*** 83,88 ****
--- 83,92 ----
orig_argc = argc; /* For Py_GetArgcArgv() */
orig_argv = argv;
+ #ifdef __hpux
+ mallopt (M_MXFAST, 512);
+ #endif /* __hpux */
+
if ((p = getenv("PYTHONINSPECT")) && *p != '\0')
inspect = 1;
if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
------------------------------------------------------------------------------
Regards,
Eddy
--
http://www.python.org/mailman/listinfo/python-list