I suspect you'd have to wait a bit more than an hour. Given this:

#!/usr/bin/perl -w use strict; use Benchmark qw/:all/; use Math::BigFloat; cmpthese( 1, { '2**10' => sub { my $x = Math::BigFloat->new(2**10); my $prod +uct = $x->copy(); $product->bfac(); }, '2**11' => sub { my $x = Math::BigFloat->new(2**11); my $prod +uct = $x->copy(); $product->bfac(); }, '2**12' => sub { my $x = Math::BigFloat->new(2**12); my $prod +uct = $x->copy(); $product->bfac(); }, '2**13' => sub { my $x = Math::BigFloat->new(2**13); my $prod +uct = $x->copy(); $product->bfac(); }, '2**14' => sub { my $x = Math::BigFloat->new(2**14); my $prod +uct = $x->copy(); $product->bfac(); } });

I get run times like these:

s/iter 2**14 2**13 2**12 2**11 2**10 2**14 139 -- -78% -97% -99% -100% 2**13 31.3 345% -- -88% -97% -99% 2**12 3.88 3488% 706% -- -78% -95% 2**11 0.870 15902% 3493% 346% -- -76% 2**10 0.210 66195% 14786% 1748% 314% --

With that kind of progression, 2**128 is, um, likely to take a while. :)


--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf

In reply to Re^2: undefined value as an ARRAY by oko1
in thread undefined value as an ARRAY by mgwmgw

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.