package
module
Version:
v0.0.0-...-b987fd4
Opens a new window with list of versions in this module.
Published: Feb 19, 2018
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
primes
is a list of prime numbers
Benchmarks
go test -bench=Uint16IsPrime
go test -bench=Sieve
References
Unit8 and Uint16 primes list was stolen from here.
The sieve.go code is a variant of this sieve.
TODO
License
MIT
Documentation
¶
Is a list of prime numbers.
func Filter(in <-chan int, out chan<- int, prime int)
Copy the values from channel 'in' to channel 'out',
removing those divisible by 'prime'.
func Generate(ch chan<- int)
Send the sequence 2, 3, 4, ... to channel 'ch'.
The prime sieve: Daisy-chain Filter processes.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.