Suitable for Large Applications?!

guy_oliver at yahoo.com guy_oliver at yahoo.com
Sun Aug 29 11:56:31 EDT 1999


On Sat, 28 Aug 1999 10:58:35 -0400, David Oppenheimer
<davidopp at megsinet.net> wrote:

>What are the real performance issues.  When I hear someone say that
>copiling the Python code took hours and compiling equivalent C code took
>seconds, tends to get a newbie like me less enthused.  Should I take
>back my O'Reilly Python book and get a book on learning C++?!

Its been the case in most of my applications that the performance was
fine in python. Ive written many very large apps in python, but I find
that in general, my python programs are shorter than their counteparts
in C++ land.  

 But as the other poster mentioned, performance depends on what you
are trying to do.  If your writing gui's that get data from the
database, you'll probably never notice the lack in performance. Most
of my apps fall into the 'you cant tell' category.  But not all

 If, on the other hand, you are trying to do very large simulations or
calculations, then it may be best to extract those bits from the
python code and implement them as an extension module.  you still get
all the benefits of using python at the high level, and you get the
benefits of C's performance at the low level.  Best of both worlds, so
to speak.  Same goes for tight integration with hardware, like
hardware drivers, etc.  Those are best written in C or someother
compiled language, but you can still wrap those drivers in python
modules so you can use the hardware from inside python.

I'd say learning them both is probably the best idea.  I'm much more
productive in Python than I am in C, yet there are times where I can
not get the behavior I want out of python, and am forced to extend it
in C.  Its not as hard as it sounds, and the positives outweigh the
negatives.  

-Guy




More information about the Python-list mailing list