in reply to Re: undefined value as an ARRAY
in thread undefined value as an ARRAY
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. :)
|
|---|