Skip to main content

Fast prime generation for Python based on Sieve of Eratosthenes and Trial Division

Project description

Eratosthenes

Fast prime generation for Python based on Sieve of Eratosthenes

Usage

from eratosthenes import sieve

# This is a Sieve of Eratosthenes with wheel factorization.
primes = sieve(1000)

# This uses the same logic to count primes up the argument.
num_primes = count(1000)

About

Eratosthenes is written in C++17 and bound for Python with pybind11. This makes it faster than just about any native Python implementation of Sieve of Eratosthenes or Trial Division!

Copyright

Copyright (c) Daniel Strano and the Qrack contributors 2017-2024. All rights reserved.

Eratosthenes is provided under an MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Eratosthenes-2.1.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Eratosthenes-2.1.3-cp38-cp38-manylinux2014_x86_64.whl (935.7 kB view details)

Uploaded CPython 3.8

File details

Details for the file Eratosthenes-2.1.3.tar.gz.

File metadata

  • Download URL: Eratosthenes-2.1.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.10

File hashes

Hashes for Eratosthenes-2.1.3.tar.gz
Algorithm Hash digest
SHA256 5ac92cc192112f693da6ad54a4ec3494a69ee4828fed2a2561538bddf5540eb0
MD5 1e0b2c70eafdebb1bcc8d5d77c87a25c
BLAKE2b-256 672e42cdfb628d6a7ab19b468cb9edf9bba50259e3c1dfbcfa27f0705fcb26c0

See more details on using hashes here.

File details

Details for the file Eratosthenes-2.1.3-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for Eratosthenes-2.1.3-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 578a78bbb240b251a14c766886feb6e51386c2f46b3434c37e40588a9c8062ba
MD5 8b3240dfa571ccc3b4040c5b9a7edc65
BLAKE2b-256 29c2db9469602a70b97be52aae4174a6ac95aa07be796c8ade09edbe64d70886

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page