Google Groups Home
Help | Sign in
PHP vs. Python
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  23 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
stephen.ma...@gmail.com  
View profile
 More options Dec 22 2004, 5:03 pm
Newsgroups: comp.lang.python
From: stephen.ma...@gmail.com
Date: 22 Dec 2004 14:03:36 -0800
Local: Wed, Dec 22 2004 5:03 pm
Subject: PHP vs. Python
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.

Thanks!
Stephen


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marek Baczynski  
View profile
 More options Dec 22 2004, 5:19 pm
Newsgroups: comp.lang.python
From: "Marek Baczynski" <imbac...@gmail.com>
Date: 22 Dec 2004 14:19:22 -0800
Local: Wed, Dec 22 2004 5:19 pm
Subject: Re: PHP vs. Python
That depends what you consider faster. PHP will save you some q&d
hacking time, but Python will save you more in the longer term IMHO.
For the other speed, see http://shootout.alioth.debian.org/

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fredrik Lundh  
View profile
(1 user)  More options Dec 22 2004, 5:12 pm
Newsgroups: comp.lang.python
From: "Fredrik Lundh" <fred...@pythonware.com>
Date: Wed, 22 Dec 2004 23:12:07 +0100
Local: Wed, Dec 22 2004 5:12 pm
Subject: Re: PHP vs. Python

stephen.ma...@gmail.com wrote:
> Anyone know which is faster?  I'm a PHP programmer but considering
> getting into Python ...

faster for what?  in my experience, people can hack into a PHP site in
no time at all, but maybe you meant something else?

(seriously, it depends on what you're doing, of course.  and how you're
running your programs.  and what kind of programs you're writing.  and
what frameworks you're using.  and, and. and, ...)

</F>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.  
View profile
 More options Dec 22 2004, 6:03 pm
Newsgroups: comp.lang.python
From: "Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle." <unseulmcmcm...@msupprimerlepoint.claveauPOINTcom>
Date: Thu, 23 Dec 2004 00:03:39 +0100
Local: Wed, Dec 22 2004 6:03 pm
Subject: Re: PHP vs. Python
Hi !

Relative in Python (and for local use), PHP is a tortoise with of a hand
brake.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen Thorne  
View profile
 More options Dec 22 2004, 6:55 pm
Newsgroups: comp.lang.python
From: Stephen Thorne <stephen.tho...@gmail.com>
Date: Thu, 23 Dec 2004 09:55:33 +1000
Local: Wed, Dec 22 2004 6:55 pm
Subject: Re: PHP vs. Python
On 22 Dec 2004 14:03:36 -0800, stephen.ma...@gmail.com

<stephen.ma...@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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Russell E. Owen  
View profile
 More options Dec 22 2004, 6:59 pm
Newsgroups: comp.lang.python
From: "Russell E. Owen" <n...@spam.invalid>
Date: Wed, 22 Dec 2004 15:59:35 -0800
Local: Wed, Dec 22 2004 6:59 pm
Subject: Re: PHP vs. Python
In article <1103753016.780533.137...@f14g2000cwb.googlegroups.com>,

 stephen.ma...@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.

For web service, the first hurdle is picking which python web interface
to use, installing it and (if necessary) configuring your web server to
use it. (All that choice is great in many respects, but it does
complicate getting started.)

Anyway, once you've done that, i doubt you'll find any speed issues with
python, and it is a more pleasant language than PHP. (Unfortunately,
that initial hurdle can be a big one; I am still using PHP on my server
because I never cleared it.)

-- Russell


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JZ  
View profile
 More options Dec 22 2004, 7:33 pm
Newsgroups: comp.lang.python
From: JZ <spame...@niet.com>
Date: Thu, 23 Dec 2004 01:33:21 +0100
Local: Wed, Dec 22 2004 7:33 pm
Subject: Re: PHP vs. Python
Dnia 22 Dec 2004 14:03:36 -0800, stephen.ma...@gmail.com napisa³(a):

> Anyone know which is faster?  I'm a PHP programmer but considering
> getting into Python ...

Python application servers (Webware, Skunkweb) can work much faster than
php. But it is true only for non-trivial code. Benchmark for "Hello world"
is a nonsense of course.

But pure speed is not the all. Python can scale better, has cleaner and
consistent syntax, better standard libraries and is a common language
rather than specific script language for web only.

--
JZ


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Rubin  
View profile
 More options Dec 22 2004, 7:43 pm
Newsgroups: comp.lang.python
From: Paul Rubin <http://phr...@NOSPAM.invalid>
Date: 22 Dec 2004 16:43:21 -0800
Local: Wed, Dec 22 2004 7:43 pm
Subject: Re: PHP vs. Python

JZ <spame...@niet.com> writes:
> But pure speed is not the all. Python can scale better,

If a system is fast enough on a single processor, it doesn't need to scale.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
huy  
View profile
 More options Dec 22 2004, 8:25 pm
Newsgroups: comp.lang.python
From: huy <nyti...@swiftdsl.com.au>
Date: Thu, 23 Dec 2004 12:25:29 +1100
Local: Wed, Dec 22 2004 8:25 pm
Subject: Re: PHP vs. Python

stephen.ma...@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.

> Thanks!
> Stephen

Is PHP too slow for your needs ? Is that the reason for changing ? If it
is, then Python might not satisfy your need. If it isn't, have you
thought about why you want to use Python ? If you have, are there
greater benefits in total over PHP from what you understand of both PHP
and PYthon.

Not sure where you are currently at with your evaluation of Python so if
you could outline a few more points on your needs, wants, and
expectations it would help when answering your questions about Python.

Huy


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Kern  
View profile
 More options Dec 22 2004, 8:57 pm
Newsgroups: comp.lang.python
From: Robert Kern <rk...@ucsd.edu>
Date: Wed, 22 Dec 2004 20:57:07 -0500
Local: Wed, Dec 22 2004 8:57 pm
Subject: Re: PHP vs. Python

Paul Rubin wrote:
> JZ <spame...@niet.com> writes:

>>But pure speed is not the all. Python can scale better,

> If a system is fast enough on a single processor, it doesn't need to scale.

I think he means, "scale to larger programs," not "scale to more
processors."

--
Robert Kern
rk...@ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Bowers  
View profile
 More options Dec 22 2004, 9:09 pm
Newsgroups: comp.lang.python
From: Jeremy Bowers <j...@jerf.org>
Date: Wed, 22 Dec 2004 21:09:12 -0500
Local: Wed, Dec 22 2004 9:09 pm
Subject: Re: PHP vs. Python

On Wed, 22 Dec 2004 16:43:21 -0800, Paul Rubin wrote:
> JZ <spame...@niet.com> writes:
>> But pure speed is not the all. Python can scale better,

> If a system is fast enough on a single processor, it doesn't need to scale.

Your point is circular; "fast enough (right now)" can be defined as
"doesn't need to scale (right now)".

For any given server app, enough clients will bog it down. If you're
trying to claim that PHP has less trouble with this, I've seen a lot of
PHP sites go down under load, so it is clearly not a non-issue.

Python's scaling isn't automatic, it's just easier to do.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paul Rubin  
View profile
 More options Dec 22 2004, 9:27 pm
Newsgroups: comp.lang.python
From: Paul Rubin <http://phr...@NOSPAM.invalid>
Date: 22 Dec 2004 18:27:14 -0800
Local: Wed, Dec 22 2004 9:27 pm
Subject: Re: PHP vs. Python

Jeremy Bowers <j...@jerf.org> writes:
> Your point is circular; "fast enough (right now)" can be defined as
> "doesn't need to scale (right now)".

> For any given server app, enough clients will bog it down. If you're
> trying to claim that PHP has less trouble with this, I've seen a lot of
> PHP sites go down under load, so it is clearly not a non-issue.

> Python's scaling isn't automatic, it's just easier to do.

I've never heard of any large sites being done in Python, with or
without scaling.  By a large site I mean one that regularly gets 100
hits/sec or more.  There are many sites like that out there.  Those
are the ones that need to be concerned about scaling.

For sites that get less traffic than that, they only reason they need
to scale if they're written in Python is that Python is too slow.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric Pederson  
View profile
 More options Dec 23 2004, 1:19 am
Newsgroups: comp.lang.python
From: "Eric Pederson" <whe...@now.com>
Date: Wed, 22 Dec 2004 22:19:24 -0800
Local: Thurs, Dec 23 2004 1:19 am
Subject: Re: PHP vs. Python