Best way of extending Python com or lnk or dll?

Darrell news at dorb.com
Tue Apr 24 22:08:18 EDT 2001


Just had an example of this in this thread "Help me use re better"
Where it was faster to stay in the regular expression engine than to loop
though it.

--Darrell

"Courageous" <jkraska1 at san.rr.com> wrote in message >
> BTW, to the original poster: the more work your code
> can do in C once it gets there, the better. Python carries
> significant overhead in dispatching to your external code.
> If you external function is meant to do very small amounts
> of work over very frequent invocations, external functions
> aren't as obvious a choice and the benefits aren't nearly
> as dramatic as you predict.
>
> Conversely, things which do very large amounts of work
> can push Python programs to at-or-near C speeds when
> done right. Calculations in Numeric Python (and friends)
> come to mind.
>
> C//
>





More information about the Python-list mailing list