From: Tanaka Akira Date: 2013-08-17T09:41:05+09:00 Subject: [ruby-core:56671] Re: [ruby-trunk - Feature #8796][Open] Use GMP to accelerate Bignum operations 2013/8/17 Eric Wong : > Is there more performance improvement without the conversion? > > How about push the conversion cost to legacy C API users to make > Bignum faster for pure-Ruby use in a future patch? It is same as ko1's idea. I don't against it. Feel free to implement and propose it. However it has several difficulties. * It is a big task. It need to implement all methods, not just slow methods. * ABI incompatibility. ko1 tackles this in Feature #6083. * LGPL It is no problem for me but I guess some people don't accept it. So we need to maintain non-GMP implementation anyway. Maintaining two implementations is troublesome. * We cannot access internal of mpz_t. We may be limited to add new feature with optimal performance. (mpz_getlimbn and mpz_size may be enough?) * It cannot embed small bignums. So it needs more memory allocation. (mpz_array_init may solve this problem?) -- Tanaka Akira