primesieve for Linux 7.5

primesieve uses the segmented sieve of Eratosthenes with wheel factorization, this algorithm has a complexity of operations and uses space.

Segmentation is currently the best known practical improvement to the sieve of Eratosthenes. Instead of sieving the interval [2, n] at once one subdivides the sieve interval into a number of equal sized segments that are then sieved consecutively. Segmentation drops the memory requirement of the sieve of Eratosthenes from to . The segment size is usually chosen to fit into the CPU's fast L1 or L2 cache memory which significantly speeds up sieving. A segmented version of the sieve of Eratosthenes was first published by Singleton in 1969 [1], Bays and Hudson in [2] describe the algorithm in more detail.

Wheel factorization is used to skip multiples of small primes. If a kth wheel is added to the sieve of Eratosthenes then only those multiples are crossed off that are coprime to the first k primes, i.e. multiples that are divisible by any of the first k primes are skipped. The 1st wheel considers only odd numbers, the 2nd wheel (modulo 6) skips multiples of 2 and 3, the 3rd wheel (modulo 30) skips multiples of 2, 3, 5 and so on. Pritchard has shown in [3] that the running time of the sieve of Eratosthenes can be reduced by a factor of if the wheel size is but for cache reasons the sieve of Eratosthenes usually performs best with a modulo 30 or 210 wheel. Sorenson explains wheels in [4].

Additionally primesieve uses Tomás Oliveira e Silva's cache-friendly bucket list algorithm if needed [5]. This algorithm is relatively new it has been devised by Tomás Oliveira e Silva in 2001 in order to speed up the segmented sieve of Eratosthenes for prime numbers past 32 bits. The idea is to store the sieving primes into lists of buckets with each list being associated with a segment. A list of sieving primes related to a specific segment contains only those primes that have multiple occurrence(s) in that segment. Whilst sieving a segment only the primes of the related list are used for sieving and each prime is reassigned to the list responsible for its next multiple when processed. The benefit of this approach is that it is now possible to use segments (i.e. sieve arrays) smaller than without deteriorating efficiency, this is important as only small segments that fit into the CPU's L1 or L2 cache provide fast memory access.

primesieve is written entirely in C++ and does not depend on external libraries [6], it compiles with every standard compliant C++ compiler. Its speed is mainly due to the segmentation of the sieve of Eratosthenes which prevents cache misses when crossing off multiples in the sieve array and the use of a bit array instead of the more widely used byte (boolean) array. These are the optimizations I use in my implementation:

Uses a bit array with 30 numbers per byte for sieving
Pre-sieves multiples of small primes ? 19
Starts crossing off multiples at the square
Uses a modolo 210 wheel that skips multiples of 2, 3, 5 and 7
Uses specialized algorithms for small, medium and big sieving primes
Processes multiple sieving primes per loop iteration to increase instruction-level parallelism
Parallelized (multi-threaded) using OpenMP
To browse the latest primesieve source code online visit the 'Source' tab.

Author Kim Walisch
License Open Source
Price FREE
Released 2019-12-27
Downloads 261
Filesize 737 kB
Requirements
Installation Instal And Uninstall
Keywords Eratosthenes sieve, prime number sieve, filter prime number, Eratosthenes, prime number, sieve
Users' rating
(1 rating)
primesieve for LinuxCADLinux
primesieve for Linux - Download Notice

Using primesieve for Linux Free Download crack, warez, password, serial numbers, torrent, keygen, registration codes, key generators is illegal and your business could subject you to lawsuits and leave your operating systems without patches. We do not host any torrent files or links of primesieve for Linux on rapidshare.com, depositfiles.com, megaupload.com etc. All primesieve for Linux download links are direct primesieve for Linux full download from publisher site or their selected mirrors.
Avoid: oem software, old version, warez, serial, torrent, primesieve for Linux keygen, crack.
Consider: primesieve for Linux full version, full download, premium download, licensed copy.

primesieve for Linux - The Latest User Reviews

Most popular CAD downloads

SSCNC

6.84 download

Turning and Milling ,Machining Center CNC simulation

5 award

AutoCAD 2020

2025 download

Tthe world's leading customizable and extendable CAD application

MarvinSketch

23.16.0 download

An advanced chemical editor for drawing chemical structures, queries

AdvancedHMI

3.99x Patch 3 download

A free software used to build HMIs that display information residing in a PLC

RISA-3D

22.0 download

A complete 3D model creator for structural engineers

Oasys AdSec

8.4 Build 41 download

The leading analysis program for sections under load

ExafsArchitect

1.1.2 download

ExafsArchitect is a handy MATLAB-based instrument

QFitsView

3.1 Revision 741 download

A FITS file viewer similar to SAOimage, DS9, and the like

OBJ mesh to solid

1.01 download

OBJ mesh to nurbs surface, imorpt OBJ file, export igs file

TNTmips

20240404 download

Analyze complex GIS data, process and modify map images