[C++-sig] which has a faster execution time?

Stefan Seefeld seefeld at sympatico.ca
Fri Jul 22 09:27:16 CEST 2005

Scott Kaplan wrote:
> I am new to Python, but I am an experienced c++ developer.
>>From the research that I have done on Python, it appears that I can
> 1) Embed Python into a C++ application or
> 2) write c++ modules to extend Python
> Which one, if either, will has better performance.

I don't quite understand the question. It appears you are trying
to compare apples and oranges.

The two techniques you are referring to serve quite distinct
use cases. The former is a means to provide scripting capabilities
to a C++ application, so the concern is hardly performance.
The latter lets a python application run code implemented in C++,
which typically results in much better performance compared to
the same functionality being implemented and run in python.

If you could describe what problem you are trying to solve
it might be easier to suggest what approach to take, but if
the question is strictly about how to gain performance in
a pure python environment, using C++ extension modules sounds
like a good idea.


More information about the Cplusplus-sig mailing list