3 times slower than c++?

Dear all, I wrapped a c++ code into python. It works but it is 3 times slower than the orignial c++ one. Is that normal? Is there something I can do to speed it up? Thanks! -- Qinfeng(Javen) Shi Research School of Information Sciences and Engineering Australian National University Locked Bag 8001 Canberra ACT 2601

"Qinfeng(Javen) Shi "
Dear all,
I wrapped a c++ code into python. It works but it is 3 times slower than the orignial c++ one. Is that normal? Is there something I can do to speed it up?
Python slower than C++? I don't believe it ! ...;-) regards Andy Little

"Andy Little"
"Qinfeng(Javen) Shi "
wrote in message news:fe76f74b0609101654o12a61256w3b6f7c4ce24cd55a@mail.gmail.com... Dear all,
I wrapped a c++ code into python. It works but it is 3 times slower than the orignial c++ one. Is that normal? Is there something I can do to speed it up?
Python slower than C++? I don't believe it !
...;-)
Hey No offence intended, but AFAIK( which isnt well) Python is built to be lightweight and versatile rather than for speed performance. regards Andy Little

Andy Little wrote:
Hey No offence intended, but AFAIK( which isnt well) Python is built to be lightweight and versatile rather than for speed performance.
That's not what he's asking: his C++ code is apparently slower when called from python than when run standalone. This is off-topic for Boost though, even if it's actually true (I'd like to know how the measurement were carried out, or rather I wouldn't, because it's off topic!). This should be moved to a more appropriate discussion list. Your friendly neighbourhood moderator, John.

"Qinfeng(Javen) Shi "
Dear all,
I wrapped a c++ code into python. It works but it is 3 times slower than the orignial c++ one. Is that normal? Is there something I can do to speed it up?
Please bring your Boost.Python questions to the C++-sig. Haven't I suggested that many times in the past? http://www.boost.org/more/mailing_lists.htm#cplussig Someone ont that list can answer you. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (4)
-
Andy Little
-
David Abrahams
-
John Maddock
-
Qinfeng(Javen) Shi