Hello Jonathan,

2008/7/21 Jonathan Vanasco <[EMAIL PROTECTED]>:
>
> php is a templating language.  all that stuff is written in c and is
> optimized.  php is WAY faster at variable interpolation than python,
> perl, everything else.
>
> templates are a small fraction of your 'business logic'.  95% of what
> you do in pylons, php, and everythign else will have the database and
> disk i/o as the bottleneck.  if you want to go for faster page
> execution, go for php - but those numbers are pretty meaningless and
> people who used python will have built apps that run just as fast in
> less time.
I think this statement is very, very misleading, especially for people
who just scan the mailinglist, or might search google for "performance
python php" or so.

I don't want to start a "religious discussion" about programming
languages here, especially about speed and ease of use.

But in my opinion that statement isn't right. Python is written in C,
just like PHP is written in C. Both languages are interpreted and
compiled into some sort of bytecode, and then executed.

To compare speed of one programming language against another,
ESPECIALLY for a web app, you have to take into consideration how the
request is handled by the webserver, what stuff is spawned and
executed then, things like that.

I probably could construct benchmarks in either way, just playing a
bit around with the setup, to prove that either PHP or Python is
faster in a web context. E.g. execute the one through a cgi interface
(slower) against some internal apache mod or a fastcgi setup where
only the request is handled dynamically.

So be careful to say such things without backing them up, or specify
more closely to what you are referring. Such generalizing statements
are very dangerous.

And to prove my point, that Python isn't slower than PHP, I back it up :)

Take a look here:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=php&lang2=python

This is just pure algorithm performance, and if I interpret this
correctly, the Python algorithm performance is generally better than
in PHP, only in a few cases PHP is better. And memory consumption is
better in Python nearly all the time.


And a bit of personal stuff as well: My personal impression is that
Pylons is blasting fast, especially with Mako templates. In execution,
in display, in everything I have encountered so far it is absolutely
comparable to any PHP app/framework I have ever seen. Everything else
I have coded in python is FastEnough(TM) as well, up to now I didn't
have the desire to hand-tune any Python application like I had to with
other programming languages I have developed in.

Sorry for this lengthy statement, but I just couldn't leave your
statement stand as it was.

Jens

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to