Re: Speed comparison of PHP vs. PERL (not conclusive)
| From: | Jason Wong | Date: | Sat, 01 Jun 2002 05:28:32 +0000 |
| Subject: | Re: Speed comparison of PHP vs. PERL (not conclusive) | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100206@lists.php.net to get a copy of this message | ||
On Saturday 01 June 2002 06:20, Daniel Grace wrote:
> > > language would in many cases show PHP to be slower simply because it's
> > > looping code is slow? [...]
>
> It is typical usage, yes, but the conversation that gave me the idea to do
> the quick speed comparison was the idea that PHP can be used for more than
> just web-scripting. I have a couple maintenance PHP scripts that run
> command-line (usually management/maintenance programs for a large PHP+MySQL
> app), and there is the entire php-gtk project as well. (The whole
> conversation started because I pondered the idea of maybe writing a Win32
> API extension for PHP)
>
> And a loop in PHP isn't exactly non-typical. I'd need more fingers and toes
> to count how many times I've wrote "while($row =
> mysql_fetch_assoc($result)) { ... }"
I would have thought that any inherent 'slowness' of looping code is
insignificant compared to the time it takes to retrieve a row from a db.
Try comparing reading 10K rows from a DB using Perl and PHP would be a more
useful benchmark.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Thank God a million billion times you live in Texas.
*/