1 unstable release

Uses old Rust 2015

0.2.0 Oct 8, 2016

#6 in #sqrt

MPL-2.0 license

10KB
129 lines

prime-suspects

An O(sqrt(n))-time implementation of Eratosthenes' sieve in Rust, with an additional implementation using segmented sieving to ensure O(sqrt(n)) memory usage.

I also wrote a Ruby version.

try it

  1. cargo run --example simple_eratosthenes
  2. cargo test for different unit/documentation tests

docs

  1. cargo doc --open

references

Shepmaster on Stack Overflow was beyond helpful in code review and in learning how to handle borrowing in parallel threads.

A list of other references I consulted along the way:

Dependencies

~420KB