2001-07-22 v1.00 Tels
* First version (basically working with some quirks)
2001-08-06 v1.01 Tels
* first release
* fixed all the bugs in v1.00
* taken over tests from BigInt v1.40
2001-09-02 v1.02 Tels
* removed auto-export and added empty import()
* taken over tests from BigInt v1.42
2001-11-01 v1.03 Tels
* taken over tests from BigInt v1.45
* added _mod() for more speed for $x % $y
#!/usr/bin/perl -w
use lib 'lib';
#use lib '../Math-BigInt-GMP-1.02/lib';
use Math::BigInt lib => 'GMP';
use Benchmark;
my $digits = 1024;
my $x = Math::BigInt->new('1' . '0' x $digits);
my $y = Math::BigInt->new('3' . '0' x ($digits - 2) . '3');
my $u = Math::BigInt->new('3');
timethese ( 2000,
{
mod_l => sub { $z = $x % $y, },
mod_s => sub { $z = $x % $u, },
div_l => sub { ($z,$r) = $x->copy()->bdiv($y), },
} );
On a 1 Ghz Athlon with v1.45 of BigInt in ops/s:
v1.02 v1.03
mod_s 1100 2350
mod_l 1111 2325
div_l 1260 1300
2001-11-01 v1.04a Tels (never released)
* _is_odd()/_is_even() use $two instead of 2: 5600 op/s instead of 4700
2002-01-26 v1.04 Tels
* use $zero,$one,$two etc instead of 0,1,2 in some routines
* tests from Math::BigInt v1.50
* bypass Math::GMP's overload interface and use Math::GMP::gmp_foo() directly
* added _gcd() and _fac() for more speed in bgcd() and bfac(), respectively
2002-02-16 v1.05 Tels
* tests from Math::BigInt v1.51
* replaced _core_lib() by config()->{lib}
* added _and, _or, _xor (using Math::GMP internal methods)
* switched _fac over to use Math::GMP gmp_fac()
* added _sqrt() using gmp_sqrt()
* used div_two and bdiv_two for _div()
* tests for _div() in list context and _mod
* added _from_hex()
The speedups in band(), bxor(), bior() and bfac() are at least factor 10 for
small numbers and quickly raise as the numbers grow ;)
The speedup for bmod() and bdiv() aren't that dramatic, but still worth it.
2002-03-23 v1.06 Tels
* fixed PREREQUISITES to Math::GMP 2.03, BigInt 1.55
* fixed typos in CHANGES
* added _from_bin()
* testsuite from v1.55
Please send me test-reports, your experiences with this and your ideas - I love
to hear about my work!
Tels <http://bloodgate.com/>