PHP vs. Python

Stephen Thorne stephen.thorne at gmail.com
Wed Dec 22 18:55:33 EST 2004


On 22 Dec 2004 14:03:36 -0800, stephen.mayer at gmail.com
<stephen.mayer at gmail.com> wrote:
> Anyone know which is faster?  I'm a PHP programmer but considering
> getting into Python ... did searches on Google but didn't turn much up
> on this.

In terms of development, Python is a far better language to write code
in[1], has a much more mature standard library[2]  and an excellent
community[3].

I've avoided your original question. Speed. Python is faster to
develop in, and is on-par with execution time. The trick is, with
python, you can trivially profile your application and re-write any
sections of code that are too slow in C, in pyrex, optimise them with
psyco, or just plain fix your efficiency problems.

Profiling in php isn't as easy as
import profile
profile.run("main()")

Regards,
Stephen Thorne.

[1] I have written php commerically for over 3 years. This isn't a
subjective look-from-afar. I actually know from down and dirty day-in
day-out experience.
[2] compare http://pear.php.net to "apt-cache search ^python"
[3] Look at http://bugs.php.net/ . There's something fundamentally
wrong with a language community where people who have stumbled on
honest-to-god bugs are abused.



More information about the Python-list mailing list