[Python-Dev] Speed up function calls
Neal Norwitz
nnorwitz at gmail.com
Tue Jan 25 00:08:29 CET 2005
On Mon, 24 Jan 2005 23:36:24 +0100, "Martin v. Löwis"
<martin at v.loewis.de> wrote:
> Neal Norwitz wrote:
> > I would like feedback on whether the approach is desirable.
>
> I'm probably missing something really essential, but...
>
> Where are the Py_DECREFs done for the function arguments?
The original code path still handles the Py_DECREFs.
This is the while loop at the end of call_function().
I hope to refine the patch further in this area.
> Also, changing PyArg_ParseTuple is likely incorrect.
> Currently, chr/unichr expects float values; with your
> change, I believe it won't anymore.
You are correct there is an unintended change in behaviour:
Python 2.5a0 (#51, Jan 23 2005, 18:54:53)
>>> chr(5.3)
'\x05'
Python 2.3.4 (#1, Dec 7 2004, 12:24:19)
>>> chr(5.3)
__main__:1: DeprecationWarning: integer argument expected, got float
'\x05'
This needs to be fixed.
Neal
More information about the Python-Dev
mailing list