Re: C-extension 2 times slower than exe

2009-06-25 Thread MRAB
Nick Craig-Wood wrote: Rolf Wester wrote: Hello, thank you all very much for your replies. I tried to simplify things and make the two versions as comparable as possible. I put the C++ part of the program into a shared object libff.so. For the exe the main function is linked against this

Re: C-extension 2 times slower than exe

2009-06-25 Thread Nick Craig-Wood
Rolf Wester wrote: > Hello, > > thank you all very much for your replies. > > I tried to simplify things and make the two versions as comparable as > possible. I put the C++ part of the program into a shared object > libff.so. For the exe the main function is linked against this shared > o

Re: C-extension 2 times slower than exe

2009-06-24 Thread Rolf Wester
Hello, thank you all very much for your replies. I tried to simplify things and make the two versions as comparable as possible. I put the C++ part of the program into a shared object libff.so. For the exe the main function is linked against this shared object. For the python stuff I made an inte

Re: C-extension 2 times slower than exe

2009-06-23 Thread Carl Banks
On Jun 23, 7:20 am, Rolf Wester wrote: > Philip Semanchuk wrote: > > > On Jun 23, 2009, at 9:51 AM, Rolf Wester wrote: > > >> Hi, > > >> I have a C++ program that I would like to steer using Python. I made the > >> wrapper using swig and linked the code (without the main function) into > >> a shar

Re: C-extension 2 times slower than exe

2009-06-23 Thread Michael Torrie
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

Re: C-extension 2 times slower than exe

2009-06-23 Thread Rolf Wester
Philip Semanchuk wrote: > > On Jun 23, 2009, at 9:51 AM, Rolf Wester wrote: > >> Hi, >> >> I have a C++ program that I would like to steer using Python. I made the >> wrapper using swig and linked the code (without the main function) into >> a shared object. My Python script loads the extension a

Re: C-extension 2 times slower than exe

2009-06-23 Thread Philip Semanchuk
On Jun 23, 2009, at 9:51 AM, Rolf Wester wrote: Hi, I have a C++ program that I would like to steer using Python. I made the wrapper using swig and linked the code (without the main function) into a shared object. My Python script loads the extension and calls a function of the C-extensio

C-extension 2 times slower than exe

2009-06-23 Thread Rolf Wester
Hi, I have a C++ program that I would like to steer using Python. I made the wrapper using swig and linked the code (without the main function) into a shared object. My Python script loads the extension and calls a function of the C-extension, the rest runs entirely within the C-extension. For com