writing a C function to manipulate python lists
Dave Cole
djc at object-craft.com.au
Thu Mar 1 07:29:31 EST 2001
>>>>> "Michael" == Michael Vanier <mvanier at endor.bbb.caltech.edu> writes:
Michael> I've been programming in python for many years but have never
Michael> had to solve this particular problem. I would like to write
Michael> a short C function that will be part of a python-callable
Michael> module. The function will receive two python lists as
Michael> arguments. Currently I do this in python, but my code uses
Michael> this function very heavily and it's the major speed
Michael> bottleneck in the code. The hope is that the C function will
Michael> be much faster than iterating through the lists in python
Michael> (which may not be true, but I'd like to see for myself).
Since I have been doing a few of these for people on this newsgroup
lately, I suppose I should be fair and extend the same offer to you
:-)
If you post the code and it is simple enough, I might be able to whip
up the C equivalent in an hour or so.
- Dave
--
http://www.object-craft.com.au
More information about the Python-list
mailing list