I wonder why it doesn’t use Karatsuba multiplication.
Ruby 2.0 seems to use plain multiuplication for up to 70 digits, Karatsuba for up to 150 digits and Toom-Cook for bigger numbers, as a quick glance into the code shows.
Oh. So this article is just wrong? It doesn’t make any claim to apply to only Ruby 1.8 or 1.9. (Is it even true of those versions?)
It’s incredibly hard to take this seriously without specific tested versions or any sources or experimental data. Also the article seems contradictory at the end. Its saying that Bignum uses “special” 4th grade math for multiplication, but GMP as well? I’d like to know if there are specific sizes of integer that ruby optimizes at, or if they’re always naive. And if they do optimize, in what versions were the optimizations added.