Skip to content

Port of D. J. Bernstein's primegen prime number generator to Go

Notifications You must be signed in to change notification settings

schulze/go.primegen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

primegen.go is a Go package that generates prime numbers in order using the
Sieve of Atkin instead of the traditional Sieve of Eratosthenes.

It is a relatively straightforward port of D. J. Bernstein's original
C implementation (http://cr.yp.to/primegen.html) but makes use of
Go's concurrency features which should make it faster on multi-core CPUs.

Do "go get github.com/jbarham/primegen.go" to install the package.

View the package documentation online at
http://gopkgdoc.appspot.com/pkg/github.com/jbarham/primegen.go
or on the command line by running "go doc github.com/jbarham/primegen.go".

The repository includes two additional programs that illustrate usage of the
primegen package:

  1. primes, which writes prime numbers to standard out
  2. primespeed, which prints the time taken to generate the first
     50,847,534 prime numbers

John Barham
jbarham@gmail.com

About

Port of D. J. Bernstein's primegen prime number generator to Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%