```I want ask how look integration of faster bignums.
It was mentioned at this ml 2 years ago where it seemed that MBignum
will be integrated but isn't.

GMP: There is problem how replace bignum with it otherwise it will be
slower with small numbers.
And problem with license(Unofficial patch | GMP taints ruby :-)

With GMP benchmark I discovered that multipling 2 fixnums into bignum is
slow because it multiplies 2 temporary bignums. Without heavy magic its unsolvable.

Addition and substraction use same technique. But because Fixnum has
one byte less than long result will fit into long. So LONG2NUM would work too.

I tried add Karatsuba multiplication to bignums and when debugging I
discovered that rb_big_pow computing doesn't normalize temps. Its not problem
with big numbers but computing power of 2 temporary variable has x these
lengths:
2**2 :1
2**4 :3
2**8 :7
2**32 31
)

Index: numeric.c
===================================================================
RCS file: /src/ruby/numeric.c,v
retrieving revision 1.142
diff -w -u -r1.142 numeric.c
--- numeric.c	2 Sep 2006 14:42:07 -0000	1.142
+++ numeric.c	4 Sep 2006 15:33:10 -0000
@@ -1908,11 +1908,8 @@
a = FIX2LONG(x);
b = FIX2LONG(y);
c = a + b;
-	r = LONG2FIX(c);
+	r = LONG2NUM(c);

-	if (FIX2LONG(r) != c) {
-	    r = rb_big_plus(rb_int2big(a), rb_int2big(b));
-	}
return r;
}
switch (TYPE(y)) {
@@ -1944,11 +1941,8 @@
a = FIX2LONG(x);
b = FIX2LONG(y);
c = a - b;
-	r = LONG2FIX(c);
+	r = LONG2NUM(c);

-	if (FIX2LONG(r) != c) {
-	    r = rb_big_minus(rb_int2big(a), rb_int2big(b));
-	}
return r;
}
switch (TYPE(y)) {
Index: bignum.c
===================================================================
RCS file: /src/ruby/bignum.c,v
retrieving revision 1.134
diff -w -u -r1.134 bignum.c
--- bignum.c    31 Aug 2006 10:47:37 -0000      1.134
+++ bignum.c    4 Sep 2006 15:37:43 -0000
@@ -1553,6 +1553,7 @@
while (yy % 2 == 0) {
yy /= 2;
x = rb_big_mul0(x, x);
+                   if ( !BDIGITS(x)[RBIGNUM(x)->len-1])RBIGNUM(x)->len--;
}
z = rb_big_mul0(z, x);
+              if ( !BDIGITS(z)[RBIGNUM(z)->len-1])RBIGNUM(z)->len--;
}

```