```hmm.. when i tried your code from your github link, this shows up:

\$ ruby /tmp/primeszp.rb
/tmp/primeszp.rb:44: warning: assigned but unused variable - rescnt
/tmp/primeszp.rb:85: warning: assigned but unused variable - rescnt
/tmp/primeszp.rb:119: warning: assigned but unused variable - rescnt
/tmp/primeszp.rb:159: warning: assigned but unused variable - rescnt
/tmp/primeszp.rb:165: warning: assigned but unused variable - modk
/tmp/primeszp.rb:212: warning: shadowing outer local variable - p
Rehearsal
-------------------------------------------------------------------------
prime tests for P = 20000000000000003   0.000000   0.000000   0.000000 (
0.000011)
Miller-Rabin                            0.000000   0.000000   0.000000 (
0.009361)
primzp7?                             ^C

\$ jruby /tmp/primeszp.rb
Rehearsal
-------------------------------------------------------------------------
prime tests for P = 20000000000000003   0.020000   0.000000   0.020000 (
0.002000)
Miller-Rabin                            0.490000   0.030000   0.520000 (
0.744000)
primzp7?                             ^C

---> hangs or too slow on both ruby 2.0 and jruby 1.7.4, so i ctrl+C it
after 10 seconds...

i'm using archlinux, amd c-60

On Thu, Jun 27, 2013 at 10:48 AM, Jabari Z. <lists / ruby-forum.com> wrote:

> I have created various implementations of methods to replace prime? and
> prime_division (from the standard lib file prime.rb) based on a class of
> mathematical operators I've developed called prime generators (PG).Using
> a special form of these PG I term Strictly Prime (SP) prime generators I
> have created extremely simple and fast algorithms that can find all the
> primes up to some number n, determine the primality of n, or
> factorization.
>
> Below are links to the paper which provides the mathematical basis for
> the proposed methods with two tables of benchmark results comparing the
> performance of the library methods prime? and prime_division with my
> proposed methods. I provide test results on 32-bit and 64-bit Linux
> systems using 5 reference primes of 17 to 19 digits.
>
> My paper, 'Improved Primality Testing and Factorization in Ruby'
>
> http://www.scribd.com/doc/150217723/Improved-Primality-Testing-and-Factorization-in-Ruby
>
> The code rile 'primeszp.rb' is available in my github repository:
> https://gist.github.com/jzakiya/455f2357cdb08f4ee1c4
>
> Attachments:
>
> http://www.ruby-forum.com/attachment/8542/Improved_Primality_Testing_and_Factorization_in_Ruby.pdf
> http://www.ruby-forum.com/attachment/8543/primeszp.rb
>
>
>
```