From: Charles Oliver Nutter Date: 2009-03-18T12:18:15+09:00 Subject: Re: BigNum optimizations M. Edward (Ed) Borasky wrote: > Ezra ... is this something Engine Yard could do for 1.8.6 / Rubinius? > I think the jRuby people are working on their Bignum performance too. We're mostly just wrapping the JDK's builtin BigInteger class, which is not known for its scorching performance. BigInteger.doubleValue actually passes the number through a a String and re-parses it (a contributor implemented a replacement, for obvious reasons). There are alternative libraries, but we have not merged them in to avoid bloating the size of JRuby's distribution. Of course almost all of them can be called directly through our Java integration layer, so if people need the performance they can do that. Java 7 is supposed to include a number of performance improvements for BigInteger as well. We would not decline a clean-room implementation of Bignum that uses the latest and greatest algorithms :) It would probably be easier in Java than in C. - Charlie