Hello,

In message "Re: bignums"
    on Tue, 5 Sep 2006 01:20:06 +0900, Ondrej Bilka <neleai / seznam.cz> writes:
|
|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
|)

Right.  I will merge your patch.  Thank you!

							matz.