1. 3
  1.  

  2. 2

    I wonder why it doesn’t use Karatsuba multiplication.

    1. 4

      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.

      1. 3

        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?)

    2. 1

      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.