Skip to content

Instantly share code, notes, and snippets.

Perpetually confused.

Christopher Kruse ballpointcarrot

Perpetually confused.
Block or report user

Report or block ballpointcarrot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ballpointcarrot / primes.rb
Created Apr 18, 2011
A comparison between the mathn library in Ruby and a self-built solution for prime generation.
View primes.rb
require 'mathn'
# Generates a list of primes below a given value
def primelist(n)
k = 1
a = [2,3]
while 6*k < n
k += 1
You can’t perform that action at this time.