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

From: Ron Johnson <ron.l.johnson_at_cox.net>
Date: Thu, 01 Jul 2004 02:25:32 -0500
Message-Id: <1088666732.29741.9.camel@haggis.homelan>

On Wed, 2004-06-30 at 22:18 -0500, Petri Laihonen wrote:
> > 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";
> ?>

Thanks.

Can that be run from the CLI, or must it be embedded in a web
page?

-- 
-----------------------------------------------------------------
Ron Johnson, Jr. ron.l.johnson@cox.net
Jefferson, LA USA
"Whatever may be the moral ambiguities of the so-called demoratic
nations and however serious may be their failure to conform
perfectly to their democratic ideals, it is sheer moral
perversity to equate the inconsistencies of a democratic
civilization with the brutalities which modern tyrannical states
practice."
Reinhold Nieburhr, ca. 1940
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/01/04

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