Here are some benchmark results done with the different versions. All were done
on a 850 Mhz Athlon, with Perl 5.6.0, Linux 2.2.16. 

v0.01 denotes the original Perl 5.6.0 and earlier code of BigInt/BigFloat.
v0.49 is a rewrite attempt by Daniel Pfeiffer as posted on usenet (with some
hacks to make it work).

The string in () after the version denotes the math lib used in BigInt as
detailed below:

   N - None (pre-Calc) C - Calc (pure perl) BV - Bit::Vector P - Math::Pari

The number below the version denotes the size of the base used in v0.49
(automatically determined) and Calc (automatically 1e7, overwritten for 1e5).
If nothing is noted, it is 1e5 for the pure-perl.

Below BV and P stands the version of the package used. If nothing is noted,
this was v1.01. v1.02 of Pari/BitVect were used together with v1.39 of BigInt,
but that should make no difference to v1.37 or v1.38 (since they are essential
the same).

Empty table fields were not measured, mostly because it took to long. If
errors occured, they are noted (Pari stack overflow etc).

###############################################################################
The following calculates n! for 1000:

$n = 1000; factorial ($n);

sub factorial
  {
  my ($n,$i) = shift;
  my $res = Math::BigInt->new(1);
  return $res if $n < 1;
  for ($i = 2; $i <= $n; $i++)
    {
    $res *= $i;
    }
  return $res;
  }

Times for 10 calculations of factorial(n):
 
       Version:
    n:  v0.01|v0.49|v1.33N|v1.36C   BV|v1.37C     C    BV    P|SSLeay::BN
             |  1e7|      |   1e5     |   1e5   1e7           |
  -----------+-----+------+-----------+-----------------------+-----------
   500   10.9|  3.0|   4.8|   5.2  1.8|   4.7   3.7   1.7  1.3|        12
  1000   48.3| 12.8|  19.0|  19.9  4.0|  18.5  14.0   3.7  2.5|        27
  2000  222.0| 55.7|  79.9|  81.7 10.0|  71.2  57.4   9.5  4.9|        40
  3000  524.4|133.1| 189.2| 192.9 18.8| 159.7 123.4  17.8  7.4|
  4000       |247.3|      |           | 270.1 245.2  29.5  9.9|

Note: The values for SSLeay::BN were interpolated (aka guessed) by taking
benchmarks from "Algorithmns in Perl", (page 486 in German version), and than
scaling the numbers to match the speed of v0.01 on this machine. You should
not trust these values too much.

###############################################################################
The following calculates x ** y 10 times:

my $a = shift || 2;
my $b = shift || 2;

for ($i=0; $i<10; $i++)
  {
  $x = Math::BigInt->new($a); $x **= $b;
  }

Times for 10 calculations of 2 ** y:
       
       Version:
          v0.01| v0.49|v1.33N|v1.36C  BV|v1.37C   C    BV      P  BV
      y:       |   1e7|      |          |   1e5 1e7              1.02
 --------------+-----+------+----------+-----------------------------
    1024    0.1|   0.1|   0.2|   0.2 0.1|   0.2   0.2 0.1    0.1  0.1
   10000    5.2|   1.9|   3.8|   3.9 0.1|   3.9   2.1 0.1    0.1  0.1
  100000  505.1| 183.8| 363.3| 368.1 0.1| 364.3 185.5 0.1    0.1  0.1
     1e7       |      |      |          |             0.21   0.3  0.2
     1e8       |      |      |          |             1.14   1)   0.6

Times for 10 calculations of 3 ** y:

       Version:
          v0.01| v0.49|v1.33N|v1.36C    BV|v1.37C     C    BV     P
      y:       |   1e7|      |            |   1e5   1e7           
 --------------+------+------+------------+-------------------------
    1000    0.2|   0.1|   0.3|   0.3   0.1|   0.3   0.1   0.1   0.1
   10000   12.9|   4.8|   9.5|   9.6   2.8|   9.5   4.9   2.8   0.1 
  100000 1279.4| 466.9| 929.8| 933.3 252.0| 920.6 465.1 252.7   0.4
     1e6       |      |      |            |                    10.7    
     1e8       |      |      |            |                     1) 

Times for 10 calculations of 10 ** y:
       
       Version:
          v0.01| v0.49|v1.33N|v1.36C    BV|v1.37C     C   BV      P
      y:       |   1e7|      |            |   1e5   1e7           
 --------------+------+------+------------+-------------------------
    1000    0.7|   0.1|   0.1|   0.6      |   0.2   0.2    0.2   0.1
   10000   56.4|   0.2|   0.1|  41.9      |   0.4   0.3    9.4   0.1
  100000       |   1.3|   0.4|            |   1.7   1.3  891.5   0.8
     1e6       |  13.4|   3.3|            |  16.7  12.1         26.3      
     1e7       | 148.0|  32.9|            |       109.9          1)

Notes: v1.33 had a special case handling for 10 ** y. 10 ** 1e8 can't be done
       due to memory constraints.

Times for 10 calculations of 50 ** y:
       
       Version:
          v0.01| v0.49|v1.33N|v1.36C BV|v1.37C     C     BV     P
      y:       |   1e7|      |         |   1e5   1e7           
 --------------+------+------+---------+--------------------------
    1000    1.8|  24.9|  21.0| 119.8   |  50.0   25.0   27.2   0.1             
   10000  160.6|      |2035.2|         |5161.2 2587.6 2636.6   0.3    
     1e6       |      |      |         |                      68.9    

Notes: v1.3x+ seperate the trailing zeros and thus greatly reduces the
       complexity to (5 ** y) << z, unlike the others which really do 50 ** y.
       Not sure why 0.01 is so fast. 

Times for 10 calculations of 200 ** y:
       
       Version:
          v0.01|v0.49 |v1.33N|v1.36C BV|v1.37C     C     BV     P
      y:       |  1e7 |      |         |   1e5   1e7           
 --------------+------+------+---------+---------------------------
     1e3    3.4|   0.2|   0.2|   2.6   |         0.3    0.6    0.1
     1e4  295.2|  14.7|   4.1| 218.5   |        15.0   40.7    0.2
     1e5       |1517.8| 366.4|         |      1526.4 4169.1    2.5
     1e6       |      |      |         |                       1)       

Notes: v1.3x+ seperate the trailing zeros and thus greatly reduces the
       complexity to (5 ** y) << z, unlike the others which really do 50 ** y. 

Errors: 
 1) stack overflow, stack size limit of 4Mbyte reached

###############################################################################
The following calculates the n'th Fibonacci number:

my $n = shift || 100;

my $x = Math::BigInt->new(1);
my $t; my $y = $x;

$i = 2;
while ($i < $n)
  {
  $t = $x + $y; $x = $y; $y = $t; $i++;
  }

Times for 10 calculations of the above fibonacci(n):
       
       Version:
          v0.01|v0.49 |v1.33N|v1.37C     C     BV      P     P
      n:       |  1e7 |      |   1e5   1e7          1.01  1.02
 --------------+------+------+--------------------------------
    1000    4.9|   0.9|   1.7|   2.1   1.9    2.1   2.2    1.8
    2000   15.6|   2.6|   4.3|   5.0   4.5    4.2   5.0    3.5
   10000  311.4|  51.7|  58.6|  61.9  49.0   20.9  98.1   17.7 
   20000 1245.3| 203.1| 222.4| 216.3 165.8   43.7 602.9   35.9 

###############################################################################
The following calculates $x + $y with length $a for $x and $b for $y:

# generate numbers
$x = Math::BigInt->new('1' . '0' x $a);
$y = Math::BigInt->new('1' . '0' x $b);

for ($i=0; $i<10_000; $i++)
  {
  $x += $y;
  }

Times for 10_000 calculations of $x += $y:
       
	Version:
                    v0.01|v0.49 | v1.39C     C    BV      P
       x:      y:        |  1e7 |    1e5   1e7    1.01   1.01
 ------------------------+------+----------------------------
     1000      10    12.7|   1.5|   1.26   1.23   1.69   1.37
    10000      10   128.2|  11.8|   1.26   1.24   2.96   1.53
   100000      10        | 233.9|   1.29   1.27  95.6    3.6
  1000000      10        |      |   1.83   1.65        238.1
  1000000     100        |      |   2.1    1.8 
  1000000    1000        |      |   5.2    4.0
  1000000   10000        |      |  36.5   26.4 
  1000000  100000        |      | 415.9  297.8
       10     100     4.8|   0.7|   1.5    1.4    1.6    1.36
       10    1000    30.1|   5.0|   4.5    3.6    1.7    1.37
       10   10000        |      |  35.5   25.5    2.9    1.5
       10  100000        |      |                94.9    4.0 

Notes: v0.49 warns a lot about "used uninitialized value in '+' in line 275".
       Remember that $x 10000 and $y 10 means that $x has 10000 digits and
       $y has 10 digits, not that $x == 10000 and $y == 10!
       The numbers are skewed, Pari/BitVect take more time for the new() than
       for the +=, because new() is O(N*N), while += is O(N) or even O(1).

###############################################################################
###############################################################################
Here are the values of a benchmark involving comparing against zero:

#!/usr/bin/perl -w

use Math::BigInt;
use Math::BigFloat;
use Benchmark;

my ($x,$y,$z,$xf,$yf,$zf);

my $digits = shift || 10;
$x = '1'.'0' x $digits;

$x = Math::BigInt->new($x);
$y = -$x;
$z = Math::BigInt->bzero();

$xf = Math::BigFloat->new($x);
$yf = -$xf;
$zf = Math::BigFloat->bzero();

timethese (40000,
  {
  ' 0 <=>  0' => sub { $z->bcmp($z); },			# 1
  ' 0 <=> +x' => sub { $z->bcmp($x); },			# 2	
  '+x <=>  0' => sub { $x->bcmp($z); },			# 3
  ' 0 <=> -x' => sub { $z->bcmp($y); },			# 4
  '-x <=>  0' => sub { $y->bcmp($z); },			# 5

  'f  0 <=>  0' => sub { $zf->bcmp($zf); },		# 6
  'f  0 <=> +x' => sub { $zf->bcmp($xf); },		# 7
  'f +x <=>  0' => sub { $xf->bcmp($zf); },		# 8
  'f  0 <=> -x' => sub { $zf->bcmp($yf); },		# 9
  'f -x <=>  0' => sub { $yf->bcmp($zf); },		# 10
  } );

Values are operations per second, done on 800Mhz Athlon. 

	Version:
                    v0.01|v0.49  | v1.39C      BV      P| v1.40C
   digits:  case:        |  1e7  |    1e7    1.01   1.01|    1e7
 ------------------------+-------+----------------------+-------
       10	1   17467|                              |  18604
       10       2   19230|                              |  18181
       10       3   19047|                              |  18264
       10       4   30075|                              |  37037
       10       5   29629|                              |  35714
       10       6   16393|                              |  16000
       10       7   12738|                              |  15444
       10       8   12658|                              |  15384
       10       9   36697|                              |  36697
       10      10   35714|                              |  35087
     1000	1   17316|                              |  18518
     1000       2   19138|                              |  18264
     1000       3   18779|                              |  18181
     1000       4   29850|                              |  36697
     1000       5   29850|                              |  35398
     1000       6   16260|                              |  15936
     1000       7   12618|                              |  15625
     1000       8   12578|                              |  15384
     1000       9   36697|                              |  36697
     1000      10   35714|                              |  35714

###############################################################################
###############################################################################
Here are some details about a rounding-shoutout. The following script creates
some big semi-random numbers and then rounds them of in 3-some steps:

#!/usr/bin/perl -w
# benchmark to measure rounding speed

# comment one out
use lib '../old'; my $class = 'Math::BigFloat';
#use lib 'lib'; my $class = 'Math::BigInt';

use Math::BigInt;
use Math::BigFloat;

$| = 1;
# for some determined randomness
srand(3);
my $digits = 2000;              # test numbers up to this length
my $loops = 25;                 # so much different numbers (more, better)

for ($i = 0; $i < $loops; $i ++)
  {
  $x = int(rand($digits)+1)+4;                  # length
  $y = "";
  while (length($y) < $x)
    {
    $y .= int(rand(10000));
    }
  $z = length($y);
  $y = $class->new($y);
  print "\r to go ",$loops-$i,"        ";
  # now round some amount to measure it instead of the setup time
  $x = $z-2;                                    # preserve so many digits
  while ($x > 3)
    {
    #$y->fround($x);                            # now round to somewhere
    $y = Math::BigFloat->new($y->fround($x));   # for old lib
    $x -= 3;
    }
  }

###############################################################################
Old v0.01 code:

Total Elapsed Time = 9.001886 Seconds
  User+System Time = 8.941886 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 15.1   1.350  1.690  13293   0.0001 0.0001  Math::BigInt::external
 14.3   1.280  1.254  26399   0.0000 0.0000  Math::BigFloat::norm
 13.3   1.190  1.133  57451   0.0000 0.0000  Math::BigInt::bnorm
 10.9   0.979  3.732   4507   0.0002 0.0008  Math::BigInt::badd
 10.2   0.920  0.893  26586   0.0000 0.0000  Math::BigInt::internal
 9.17   0.820  0.802  17588   0.0000 0.0000  Math::BigFloat::stringify
 9.06   0.810  2.572  17613   0.0000 0.0001  Math::BigFloat::fnorm
 5.59   0.500  0.495   4507   0.0001 0.0001  Math::BigInt::add
 4.81   0.430  8.143   8794   0.0000 0.0009  Math::BigFloat::fround
 3.69   0.330  0.321   8786   0.0000 0.0000  Math::BigInt::mul
 3.02   0.270  1.348   8786   0.0000 0.0002  Math::BigInt::bmul
 2.24   0.200  5.658   8786   0.0000 0.0006  Math::BigFloat::round
 1.57   0.140  0.131   8786   0.0000 0.0000  Math::BigInt::cmp
 1.12   0.100  0.806   8819   0.0000 0.0001  Math::BigFloat::new
 0.78   0.070  0.408   8786   0.0000 0.0000  Math::BigInt::bcmp
 0.22   0.020  0.040      3   0.0067 0.0133  main::BEGIN
 0.11   0.010  0.010      1   0.0100 0.0100  Math::BigInt::BEGIN
 0.11   0.010  0.010      2   0.0050 0.0050  lib::BEGIN
 0.00   0.000 -0.000      1   0.0000      -  Config::TIEHASH
 0.00   0.000 -0.000      1   0.0000      -  Config::import
 0.00   0.000 -0.000      6   0.0000      -  Config::FETCH
 0.00   0.000 -0.000      1   0.0000      -  lib::import
 0.00   0.000 -0.000      2   0.0000      -  overload::import
 0.00   0.000 -0.000      2   0.0000      -  overload::OVERLOAD
 0.00   0.000 -0.000      2   0.0000      -  Math::BigInt::import
 0.00   0.000 -0.000      4   0.0000      -  Math::BigFloat::BEGIN
 0.00   0.000 -0.000      3   0.0000      -  Exporter::import
 0.00   0.000 -0.000      1   0.0000      -  warnings::BEGIN
 0.00   0.000 -0.000      1   0.0000      -  warnings::bits
 0.00   0.000 -0.000      1   0.0000      -  warnings::unimport

###############################################################################
New v1.33 code:

Total Elapsed Time = 7.923339 Seconds
  User+System Time = 7.863339 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 33.5   2.637  8.367   8794   0.0003 0.0010  Math::BigInt::bround
 25.3   1.990  1.983   4507   0.0004 0.0004  Math::BigInt::add
 12.8   1.010  1.006    918   0.0011 0.0011  Math::BigInt::bstr
 8.77   0.690  0.683   4533   0.0002 0.0002  Math::BigInt::_internal
 8.39   0.660  0.587  31807   0.0000 0.0000  Math::BigInt::objectify
 5.60   0.440  0.433   4533   0.0001 0.0001  Math::BigInt::_split
 4.83   0.380  0.723  17588   0.0000 0.0000  Math::BigInt::digit
 3.82   0.300  0.783  27300   0.0000 0.0000  Math::BigInt::length
 2.54   0.200  0.159  27300   0.0000 0.0000  Math::BigInt::_digits
 2.03   0.160  2.279   4507   0.0000 0.0005  Math::BigInt::badd
 1.78   0.140  0.113  17808   0.0000 0.0000  Math::BigInt::is_zero
 1.78   0.140  1.232   4533   0.0000 0.0003  Math::BigInt::new
 1.53   0.120  0.107   8794   0.0000 0.0000  Math::BigInt::_scale_a
 1.14   0.090  0.027  41765   0.0000 0.0000  Math::BigInt::trace
 0.89   0.070  8.410   8794   0.0000 0.0010  Math::BigInt::fround
 0.38   0.030  0.017   8794   0.0000 0.0000  Math::BigInt::is_nan
 0.38   0.030  1.092    918   0.0000 0.0012  Math::BigInt::_scan_for_nonzero
 0.38   0.030  0.080      3   0.0100 0.0266  main::BEGIN
 0.25   0.020  0.030      5   0.0040 0.0060  Math::BigInt::BEGIN
 0.13   0.010  0.003   4507   0.0000 0.0000  constant::__ANON__
 0.13   0.010  0.010      5   0.0020 0.0020  strict::bits
 0.13   0.010  0.010      1   0.0100 0.0100  vars::BEGIN
 0.13   0.010  0.010      2   0.0050 0.0050  lib::BEGIN
 0.00   0.000 -0.000      3   0.0000      -  Exporter::heavy_export_to_level
 0.00   0.000 -0.000      3   0.0000      -  Exporter::export
 0.00   0.000 -0.000      3   0.0000      -  Exporter::heavy_export
 0.00   0.000  0.010      6   0.0000 0.0017  Math::BigFloat::BEGIN
 0.00   0.000 -0.000      1   0.0000      -  Config::BEGIN
 0.00   0.000 -0.000      1   0.0000      -  Config::TIEHASH
 0.00   0.000 -0.000      1   0.0000      -  Config::import
