John Hunter jdhunter at ace.bsd.uchicago.edu
Sat Jan 3 08:27:03 CET 2004

>>>>> "EP" == EP  <EP at zomething.com> writes:

    EP> On questions of the suitability of Python for CGI, embedded
    EP> apps, etc., execution speed comes to mind.  I previously read
    EP> some comparisons which did not show Python in a good light in
    EP> this regard: i.e. Python is slow compared to Perl, C++, Java.

Donald Knuth, God of Computer Science, said "Premature optimization is
the root of all evil".  The essence of the quote is that you shouldn't
code for performance until the current implementation is hogging a
disproportionate chunk of the CPU cycles.  In layman's terms: code
something that works, and when you hit a performance bottleneck, run a
profiler, find the inefficiencies, and refactor looking for a 2-20x
performance boost.

I write python apps for the hospital I work for, mainly for epilepsy
patients.  The EEG data files are large, several hundred megabytes
each, and in addition we have CT and MRI 3D image data to incorporate.
python, with judicious use of Numeric and pygtk, is more than enough
to handle the everyday cases.  Are you dealing with several hundred
megabytes per record or more?  If not, my guess is that you can handle
your use cases in python with a little careful thought.

In a Nut's Hell, write a prototype app.  If you are unsatisfied with
performance, post here.  Otherwise, mark today as the last day you
ever coded perl, as I fondly mark that day 5 years ago.


More information about the Python-list mailing list