Page 1 of 2

Who wants to race :wink:

Posted: Fri May 24, 2002 4:18 am
by Benjamin
This is a neat bit of code that I found...

Code: Select all

<?php
function getmicrotime()&#123; 
    list($usec, $sec) = explode(" ",microtime()); 
    return ((float)$usec + (float)$sec); 
    &#125; 

$time_start = getmicrotime(); 
    
for ($i=0; $i < 1000; $i++)&#123; 
    //do nothing, 1000 times 
    &#125; 

$time_end = getmicrotime(); 
$time = $time_end - $time_start; 

echo "Did nothing in $time seconds";
?>
On my box this returned..
Did nothing in 0.0010370016098022 seconds
Anyone wanna race :twisted:

Posted: Fri May 24, 2002 9:03 am
by mikeq
Did nothing in 0.0068190097808838 seconds :cry:

Posted: Fri May 24, 2002 9:17 am
by jason
Did nothing in 0.00066101551055908 seconds :D :D :D

Do nothing yourself!

Posted: Fri May 24, 2002 9:31 am
by Benjamin
Jason you can't cheat and use a network server with 2 Pentium 2.2 chips and 1gb of ram lol

Well I guess you can...

Posted: Fri May 24, 2002 2:55 pm
by enygma
Did nothing in 0.00065898895263672 seconds

ph33r m3.

Posted: Fri May 24, 2002 3:06 pm
by fluidman
Did nothing in 0.00064897537231445 seconds

w00t

Posted: Fri May 24, 2002 3:57 pm
by hob_goblin
7.32164895637121754

lol
man my computer is slow ;)

Posted: Fri May 24, 2002 8:49 pm
by lc
ahem
Did nothing in 0.16882300376892 seconds
Well for a winme laptop ;)

Posted: Fri May 24, 2002 8:56 pm
by volka
Did nothing in 0.0059289932250977 seconds
on my k6-2/450 apache 2.0.36/prefork PHP/4.2.1

Posted: Sat May 25, 2002 12:06 am
by fatal
Did nothing in 0.00067305564880371 seconds - 0wnage :D

Posted: Sat May 25, 2002 7:39 am
by MattF
Did nothing in 0.0092679262161255 seconds - on a AMD Duron 600MHZ with 256MB RAM, how's that?

Posted: Sat May 25, 2002 2:02 pm
by Gath
Did nothing in 0.050192952156067 seconds

PII 233, 64RAM...

Posted: Sat May 25, 2002 3:00 pm
by NetDragonX
Bleh - I guess I need a faster system:

Did nothing in 0.00087606906890869 seconds

Did that on a 1.4Ghz P4 - 128 SDRAM.

Posted: Sat May 25, 2002 4:52 pm
by sam
Did nothing in 0.00076940832138062 seconds... :)

Amd Athlon 1400mhz, 1gig RAM... Windows XP Pro, 2000 server (tested both server was slower ???) :)

Cheers Sam

Posted: Sat May 25, 2002 8:10 pm
by Tiimmy
Did nothing in 0.00000007265390261 seconds
Can anyone say GOD??? :twisted: :twisted: :twisted: :twisted: :twisted: