From: Charles Oliver Nutter Date: 2009-04-30T01:20:33+09:00 Subject: Re: [QUIZ] Digits of Pi (#202) Daniel Moore wrote: > This week's quiz is to write a Ruby program that can compute the first > 100,000 digits of π. There's the impl on the benchmarks game (shootout): http://shootout.alioth.debian.org/u32q/benchmark.php?test=pidigits&lang=ruby&id=1 But it doesn't seem fast enough to get to 100k digits in any amount of time I'm willing to wait for it. Here's timings for all the Ruby versions I have handy, calculating up to 10k digits: (jruby time is on Java 6 server VM) JRuby 1.3-dev: 0m47.903s Ruby 1.9.1: 1m27.527s Rubinius master: 2m50.545s MacRuby 0.4: 1m9.832s IKRuby*: 3m26.861s Ruby 1.8.7: 1m47.887s MacRuby 0.5-experimental crashed after only a few digits. IKRuby is JRuby on CLR (Mono, here) using IKVM. Seems like we need a faster algorithm! - Charlie