Python is faster than C

Jacek Generowicz jacek.generowicz at cern.ch
Mon Apr 5 04:18:30 EDT 2004


"Michel Claveau/Hamster" <No.Spam.mc at No.Spam.mclaveau.No.Spam.com> writes:

> Yes, but Psyco is writted in C & Python, and it use an C module.
> Said "Psyco is faster than C", it's like said "Psyco is faster than Psyco".

You appear to be missing the point completely.

The language used to implement the tools you use is irrelevant. What
is important is the language in which you are programming.

Armin's point is that (in certain circumstances) you can achieve a
significant speedup by one of two ways

- Recode some Python code in C

- import psyco; psyco.full()

Note: in the second case, this is _all_[*] you have to do; it takes
about 2 seconds of work. In the first case it take many
hours/days/weeks of tedious and error-prone work.


The point is: Why code in C when you can get just as good program
speed performance by coding in Python.

Put another way: Why code in a low-level, tedious, rigid,
error-inducing language, when you can get just as good program speed
performance by writing in a high-level, flexible, dynamic, pleasant
language.



[*] Yes, I'm deliberately keeping things simple in order not to draw
    attention away from the real point.



More information about the Python-list mailing list