From: Phrogz Date: 2007-03-03T00:15:05+09:00 Subject: Re: C-ish bitwise prime sieve in Ruby? On Mar 2, 7:05 am, Jimmy Kofler wrote: > Can we translate the following C-coded prime sieve by Frank Pilhofer > into a Ruby version that also uses bitwise operations? > > Thanks for any suggestions! > > #include > #include > #include > #include > > /* > Sieve of Eratosthenes. > C code by Frank Pilhofer.http://www.fpx.de/fp/Software/Sieve.html > */ Also: a) http://www.google.com/search?q=Eratosthenes+ruby b) If you're doing this to learn Ruby, that's fine. However, if you want speed, you might want to look at RubyInline, which lets you re- use pieces of C-code directly within Ruby.