affects on extended modules

Curtis Jensen cjensen at bioeng.ucsd.edu
Wed Nov 28 11:57:25 EST 2001


We have created a python interface to some core libraries of our own
making.  We also have a C interface to these same libraries.  However,
the the python interface seems to affect the speed of the extended
libraries.  ie.  some library routines have their own benchmark code,
and the time of exection from the start of the library routine to the
end of the library routine (not including any python code execution),
takes longer than it's C counterpart.  Note, all data memory in Python
is allocated using Numeric to allocate memory for arrays.  All data
memory in the C counterpart is allocated using basic array constructs
using alloc.

We are unsure of why there is a performance difference.  We only have
some speculation.  Our best guess is that the memory allocated in Python
is causing cache faults and thus incurring some overhead.  If anyone
else has any ideas, we would appreciate any input.  Thanks.

-- 
Curtis Jensen
cjensen at bioeng.ucsd.edu
http://www-bioeng.ucsd.edu/~cjensen/
FAX (425) 740-1451



More information about the Python-list mailing list