Distributed App - C++ with Python for Portability?

Paddy paddy3118 at googlemail.com
Mon Mar 10 06:59:45 CET 2008

On Mar 9, 11:41 pm, Roopan <elampoora... at gmail.com> wrote:
> Hello!
> I am looking at developing an enterprise-grade distributed data
> sharing application - key requirements are productivity and platform
> portability.
> Will it be sensible to use C++ for performance-critical sections and
> Python for all the glue logic.
> Pls comment from your *experiences* how Python scales to large
> projects( > 200KLOC).
> I assume the C++/Python binding is fairly painless.
> Regards
> Elam.

You might try prototyping as much as possible in Python as soon as
Then, and only after getting something that computes the right
profile your prototype to see where the real bottlenecks are.
Sometimes it
it is not evident at the beginning where the bottlenecks in the
will be.
If you write most of the prototype in Python then you will write less
lines of code, in a shorter time and so should be more inclined to
experiment with different algorithms, and do more testing. (Doctest
be great).
After profiling their may be other ways to remove a bottleneck, such
using existing highly-optimised libraries such as Numpy; Psycho, an
optimising interpreter that can approach C type speeds for Python
and you could create your own C++ based libraries.

You might want to ask the Mercurial development team how they got
impressive speed and functionality out of using mainly Python with
critical regions in C. - Or watch this:

- Paddy.

More information about the Python-list mailing list