Is python very slow compared to C

Steven D'Aprano steve at REMOVETHIScyber.com.au
Sat Feb 11 20:03:11 EST 2006


On Sat, 11 Feb 2006 12:49:32 -0800, diffuser78 wrote:

> I have just started to learn python. Some said that its slow. 

No, you can learn the basics of Python is only a few hours, and become
very proficient at it in days or weeks. It is much faster to learn Python
than to learn C.

> Can somebody pin point the issue.

What is slow? Slow compared to what? Would you prefer to spend three days
writing a program that will run in twenty milliseconds, or three hours
writing the same program which runs in eighty milliseconds? Is the
computer's execution time more important than your development time? If
the computer's time is more valuable than your time, then you should be
writing in assembly language.

Python helps you write shorter code with fewer bugs, much quicker, than C.
If you discover a specific problem that runs too slow in Python, it is
possible to write a C extension to solve that specific problem, while
still having all the other advantages of Python.


-- 
Steven.




More information about the Python-list mailing list