Is python very slow compared to C

Cameron Laird claird at lairds.us
Sun Feb 12 10:08:03 EST 2006


In article <1139751088.720150.80010 at g43g2000cwa.googlegroups.com>,
Luis M. González <luismgz at gmail.com> wrote:
			.
			.
			.
>> 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.
>
>You are right, we all know that, but I think the person who asked this
>question doesn't want to hear a sales pitch. He asked a very specific
>question regarding execution speed.
>

Also, a couple of people have written, "If you want speed, choose
assembler."  With full recognition of all these comments, my spe-
cific response to the question regarding execution speed is, "If
you want speed, Python makes a great choice.  We have re-coded
*from* C to Python in order to IMPROVE performance."

Python-coded applications aren't always faster than corresponding
C-coded ones.  Sometimes they're considerably slower.  Many new-
comers to Python, though, underestimate how much performance they'll
gain *algorithmically* by developing at the high level of Python or
Erlang or ML.



More information about the Python-list mailing list