Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")
Moderator: General Moderators
kanenas.net
Forum Newbie
Posts: 12 Joined: Sun Jun 26, 2005 12:29 pm
Location: Athens - Greece
Contact:
Post
by kanenas.net » Sat Nov 15, 2008 1:34 pm
The machine: Intel Core 2 Duo Processor 1.8GHz, 2GB RAM
OS: Microsoft Vista Home Premium, IIS 7.0
Scripting Languages: PHP 5.2.6, ASP 3.0
Senario: Test a loop to see the time results...
Here is the
ASP code...
Code: Select all
<%
Dim i, st
st=Now()
For i=0 To 50000000
Next
response.write st & "<br />"
response.write Now()
%>
Here is the
PHP code...
Code: Select all
<?php
set_time_limit(150);
$st=date("H:i:s");
for ($i=0; $i<=50000000; $i++) {
}
echo $st . "<br />";
echo date("H:i:s");
?>
Results...
Code: Select all
[b]Loop[/b] [b]PHP Start[/b] [b]PHP End[/b] [b]ASP Start[/b] [b]ASP End[/b]
0-50.000.000 19:42:42 19:42:47 15/11/2008 7:43:07 ?? 15/11/2008 7:43:10 ??
0-100.000.000 19:45:38 19:45:49 15/11/2008 7:45:29 ?? 15/11/2008 7:45:35 ??
0-1.000.000.000 19:48:46 19:50:39 15/11/2008 7:47:21 ?? 15/11/2008 7:48:18 ??
Is it because of
Windows IIS 7.0 ?
I haven't tried the
PHP script with
Apache !
Any comments ?
XaeroDegreaz
Forum Newbie
Posts: 10 Joined: Mon Nov 10, 2008 9:09 pm
Post
by XaeroDegreaz » Mon Nov 17, 2008 12:21 am
The ASP code is running on it's native platform, so of course it will be faster
Try running PHP with the Zend Platform
josh
DevNet Master
Posts: 4872 Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida
Post
by josh » Sat Nov 22, 2008 6:06 pm
Next time I have to write an infinite loop Im definitely using ASP
JAB Creations
DevNet Resident
Posts: 2341 Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:
Post
by JAB Creations » Fri Dec 05, 2008 11:20 pm
jshpro2 wrote: Next time I have to write an infinite loop Im definitely using ASP
Yeah, wouldn't want to give the client enough time to hit the escape button!