Why is Python so slow?

Peter Schneider-Kamp petersc at stud.ntnu.no
Fri Jun 9 01:55:31 EDT 2000


William Dandreta wrote:
> 
> I am just learning Python and I wrote a little program to modify a text file
> with 120,000 lines. It took 1hr and 30 mins. I wrote a C program that
> created the text file from a .dbf and it only took 2 mins.
> 
> Both programs ran on the same machine (486-133mhz) under Concurrent DOS (a
> multi-user mutitasking OS).
> 
> The Python version was 1.2.
> 
> Why does it take Python 50 times longer than C?

3 possibilities jump into my brain:

1.) Borland C++ does a really bad job
2.) You're doing a bad job utilizing Pythons power
3.) python is doing a bad job

To resolve this amtriguity, could you post the Python and the
C code?

you-could-of-course-use-the-C-code-inside-Python-ly y'rs Peter
--
Peter Schneider-Kamp          ++47-7388-7331
Herman Krags veg 51-11        mailto:peter at schneider-kamp.de
N-7050 Trondheim              http://schneider-kamp.de




More information about the Python-list mailing list