C-extension 2 times slower than exe

Michael Torrie torriem at gmail.com
Tue Jun 23 14:30:42 EDT 2009


Rolf Wester wrote:
> The runtime is about 2.5 sec and 5.0 sec respectively. I not only use
> the time command to measure the time consumed but I also measure the
> time within the C-code using clock() and get similar result. So the
> Python startup time is not the reason for the runtime difference I
> found. Thank you anyway.

Without a profiler it's hard to say where the time is being consumed.
You might want to use ctypes and open your c++ code as a DLL without the
python extension wrapper.



More information about the Python-list mailing list