RE: [Nolug] In case you wanted to know how big 2 to the 3,000, 000is...

From: Petri Laihonen <pietu_at_weblizards.net>
Date: Wed, 30 Jun 2004 22:18:04 -0500 (CDT)
Message-ID: <2605.68.14.52.165.1088651884.squirrel@secure.weblizards.net>

> On Wed, 2004-06-30 at 17:54 -0500, Petri Laihonen wrote:
>> >> It took about 15 minutes on my Athlon(tm) XP 2200+. Shoulda
>> >> timed it.
>> >
>> > I have a P4 1.4 Ghz machine. I was doing a few other things at the
>> time
>> > too...
>> >
>> >
>> > Wed Jun 30 15:49:54 CDT 2004
>> > 903090
>> > Wed Jun 30 16:23:23 CDT 2004
>> >
>> >
>> > 33 minutes!
>> >
>>
>> I like this kind of pissing contest where inferior machine beats the
>> hell
>> out of "superior" machines.
>>
>> My web server,
>> AMD Duron ~ 1Ghz,
>> while handling all the webstuff, emails, database etc.... for a bit
>> under
>> 100 domains calculated that same thing in :
>>
>> Surprise..... 131 seconds. (Roughly under 3 minutes.)
>>
>> I got the same result
>> length: 903090
>> time: 131
>>
>> Except I just used PHP from commandline.
>> Could the language used really make that much of a difference?
>> If yes, who would use such a slow language???
>
> Sooo, what command did you use. Please share it with us.
>

Here it is!

<?php
$time1 = time();
print "start\n";
$result = bcpow(2,3000000);
$len = strlen($result);
$time2 = time();
$ctime = $time2 - $time1;
//print "result: $result\n";
(did not feel like printing all the numbers to the screen)
print "length: $len\n";
print "time: $ctime\n";
?>

P

___________________
Nolug mailing list
nolug@nolug.org
Received on 06/30/04

This archive was generated by hypermail 2.2.0 : 12/19/08 EST