Hello all,

I've been encouraged by Gregory Brown of Prawn and Ruby Best Practices fame
to submit an issue to the list for consideration.

A quick background first. In my spare time, I've been solving Project Euler
problems in Ruby as a way of exercising and stretching my coding and math
muscles. The most recent problem I solved is Problem
10<http://projecteuler.net/index.php?section=problems&id=10>: Find sum
of primes below 2 million.

I approached this problem a few different ways: my own solution, a Ruby
standard library solution and my improved solution after studying more math,
etc. What I ran into was surprising. If the limit at which the program stops
finding and computing the primes is greater than 100,000, the Prime class
takes up to 7 times as long as my first crack at the problem (using trial
division) and 30 times as long using an improved solution (Sieve of
Eratosthenes).

I've done two test runs and posted the benchmarks and code here:
http://gist.github.com/142907

I am running this test on Windows XP SP3, 2 GB of RAM and an Intel 2GHz
dual-core processor. The test was run in the irb console.

If you need more information or more runs, please let me know and I will
gladly oblige.

For reference, this solution on Ruby 1.9 running on Mac OS X was submitted
to me by Gregory Brown over Twitter: *time ruby19 -rprime -e
"Prime.take_while { |e| e < 2_000_000 }.inject { |s,r| s + r }" real
0m2.938s*