[#8815] Segfault in libc strlen, via rb_str_new2 — "Sean E. Russell" <ser@...>

Howdy,

12 messages 2006/09/09
[#8817] Re: Segfault in libc strlen, via rb_str_new2 — Eric Hodel <drbrain@...7.net> 2006/09/09

On Sep 8, 2006, at 10:10 PM, Sean E. Russell wrote:

Re: bignums

From: Yukihiro Matsumoto <matz@...>
Date: 2006-09-04 20:04:09 UTC
List: ruby-core #8795
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.

In This Thread