primesieve Changelog

What's new in primesieve 12.3

Apr 18, 2024
  • Improve Windows multiarch support (now works with MinGW64).
  • Add runtime POPCNT detection using CPUID for x86 CPUs.
  • Improve GCC/Clang multiarch preprocessor logic.
  • CMakeLists.txt: Remove POPCNT/BMI check for x86 CPUs.

New in primesieve 12.1 (Mar 10, 2024)

  • This is a new maintenance release, it is fully backwards compatible with the previous release.
  • CMakeLists.txt: Fix undefined reference to pthread_create #146.
  • test/Riemann_R.cpp: Fix musl libc issue #147.
  • src/app/test.cpp: Fix -ffast-math failure.
  • test/count_primes2.cpp: Fix -ffast-math failure.
  • PrimeSieve.cpp: Improve status output.

New in primesieve 12.0 (Feb 19, 2024)

  • The C/C++ API and ABI of primesieve-12.0 are fully backwards compatible with primesieve-11.*
  • The stress test functionality is the main new feature of primesieve-12.0, it can be launched using the --stress-test[=MODE] option of the primesieve command-line application. The stress test option supports two modes: CPU (default) or RAM. The CPU mode uses little memory (< 5 MiB per thread) and puts the highest load on the CPU. The RAM mode uses much more memory (each thread uses about 1.16 GiB) than the CPU mode, but the CPU usually won't get as hot. Due to primesieve's function multi-versioning support, on x64 CPUs the stress test will run an AVX512 algorithm if your CPU supports it.
  • StressTest.cpp: New -S[=MODE] and --stress-test[=MODE] command-line options.
  • RiemannR.cpp: Faster Riemann R function implementation #144.
  • CmdOptions.cpp: New -R and --RiemannR command line options.
  • CmdOptions.cpp: New --RiemannR-inverse command line option.
  • CmdOptions.cpp: Add new --timeout option for stress testing.
  • Main.cpp: Improve command-line option handling.

New in primesieve 11.2 (Jan 10, 2024)

  • nthPrime.cpp: Rewritten using more accurate nth prime approximation.
  • nthPrimeApprox.cpp: Added logarithmic integral and Riemann R function implementations.
  • cmake/libatomic.cmake: Fix failed to find libatomic.
  • .github/workflows/ci.yml: Port AppVeyor CI tests to GitHub Actions.
  • doc/C_API.md: Fix off by 1 error in OpenMP example.
  • doc/CPP_API.md: Fix off by 1 error in OpenMP example.
  • Vector.hpp: Rename pod_vector to Vector and pod_array to Array.
  • iterator.h: Improve documentation.
  • iterator.hpp: Improve documentation.
  • C_API.md: Add SIMD (vectorization) section.
  • CPP_API.md: Add SIMD (vectorization) section.
  • README.md: Add C & C++ API badges.

New in primesieve 11.1 (May 13, 2023)

  • PreSieve.cpp: Vectorize loop using x64 SSE2 & ARM NEON.
  • popcount.cpp: Add POPCNT algorithm for x64 & AArch64.
  • primesieve.h: Fix -Wstrict-prototypes warning.
  • examples/c/*.c: Fix -Wstrict-prototypes warning.
  • test/*.c: Fix -Wstrict-prototypes warning.
  • CMakeLists.txt: New WITH_AUTO_VECTORIZATION option (with default ON).
  • cmake/auto_vectorize.cmake: Enable auto-vectorization if the compiler supports it.
  • scripts/build_mingw64_x64.sh: Build primesieve x64 release binary.
  • scripts/build_mingw64_arm64.sh: Build primesieve arm64 release binary.

New in primesieve 11.0 (Dec 6, 2022)

  • CMakeLists.txt: Improve Emscripten WebAssembly support.
  • Iterator.cpp: Add new primesieve::iterator::jump_to().
  • Iterator.cpp: Fix use after free in primesieve::iterator::clear().
  • Iterator-c.cpp: Add new primesieve_jump_to().
  • Iterator-c.cpp: Mark primesieve_skipto() as deprecated.
  • Iterator-c.cpp: Fix use after free in primesieve_iterator_clear().
  • Pod_vector.hpp: Added support for types with destructors.
  • Malloc_vector.hpp: Fix potential memory leak.
  • Api.cpp: Support non power of 2 sieve sizes.
  • PrimeSieve.cpp: Support non power of 2 sieve sizes.
  • PreSieve.cpp: Use std::initializer_list instead of std::vector.
  • Erat.cpp: Improve documentation.
  • C_API.md: Improve next_prime() and prev_prime() documentation.
  • CPP_API.md: Improve next_prime() and prev_prime() documentation.

New in primesieve 8.0 (Sep 19, 2022)

  • Highlights of primesieve-8.0:
  • libprimesieve now has multiarch support for x64 CPUs. At runtime libprimesieve now dispatches to the latest supported CPU instruction set like POPCNT, BMI2, AVX512 #116.
  • libprimesieve now generates an array (or vector) of primes up to 20% faster #123.
  • ChangeLog:
  • primesieve::iterator's ABI has been modified in both the C & C++ API.
  • primesieve::iterator's API remains backwards compatible.
  • CPP_API.md: Renamed doc/CPP_Examples.md to doc/CPP_API.md.
  • C_API.md: Renamed doc/C_Examples.md to doc/C_API.md.
  • Fix undefined behavior (g++-12 issue) caused by resizeUninitialized.hpp, use new pod_vector<uint64_t> from pod_vector.hpp instead.
  • iterator.cpp: Enable pre-sieving for primesieve::iterator.prev_prime().
  • iterator-c.cpp: Enable pre-sieving for primesieve::iterator.prev_prime().
  • PreSieve.cpp: Detect if the user sieves many consective intervals.
  • PrimeGenerator.cpp: Improve AVX512 of fillNextPrimes().
  • PrimeGenerator.cpp: Reduce memory usage for tiny stop numbers.
  • PrimeGenerator.hpp: Add GCC/Clang's function multiversioning for AVX512.
  • Erat.cpp: Dynamically grow the sieve size: use a small sieve size for small stop numbers and a large sieve size for large stop numbers.
  • Erat.cpp: Reduce memory usage, allocate the minimum required memory to store all sieving primes.
  • CpuInfo.cpp: Detect AVX512 using CPUID.
  • pmath.hpp: Use compiler instrinsics for ilog2() & floorPow2().
  • StorePrimes.hpp: Use vector::insert() instead of vector::push_back(), see: #123.
  • CMakeLists.txt: Automatically enable expensive debug assertions in debug mode (if CMAKE_BUILD_TYPE=Debug).

New in primesieve 7.9 (May 4, 2022)

  • intrinsics.hpp: Improved x64 BSF assembly.
  • iterator.cpp: Reduce memory allocations in generate_prev_primes().
  • iterator-c.cpp: Reduce memory allocations.
  • CpuInfo.cpp: Improve hybrid CPU detection on Linux.
  • Erat.cpp: Reduce memory usage when sieving a single segment.
  • EratBig.cpp: Improve instruction level parallelism.
  • EratBig.cpp: Improve next wheel index code.
  • EratBig.cpp: Use std::copy() instead of std::rotate().
  • SievingPrimes.cpp: Reduce branch mispredictions.
  • PreSieve.cpp: Hardcode buffersDist.
  • MemoryPool.cpp: Reduce memory usage.
  • StorePrimes.hpp: Improve nth prime approximation.
  • config.hpp: Tune FACTOR_ERATMEDIUM constant.
  • Use a single MemoryPool per thread (previously 2).
  • Increase max sieve array size to 8 KiB.

New in primesieve 7.8 (Jan 30, 2022)

  • PreSieve.cpp: Add multiple pre-sieve buffers #110.
  • PrimeGenerator.cpp: Reduce branch mispredictions #109.
  • PrimeGenerator.cpp: Add AVX512 algorithm #109.
  • iterator.cpp: Avoid default initialization of primes vector.
  • iterator-c.cpp: Avoid default initialization of primes vector.
  • ParallelSieve.cpp: Initialize PreSieve.
  • ALGORITHMS.md: Update documentation.

New in primesieve 7.7 (Dec 5, 2021)

  • CpuInfo.cpp: Fix issues with big.LITTLE CPUs #105.
  • api.cpp: Simplify private L2 cache size detection #103.
  • config.cpp: Add fallback sieve size & L1 data cache size.
  • Erat.cpp: If runtime CPU cache detection fails use config::L1D_CACHE_BYTES.
  • main.cpp: Improve -q/--quiet option #102.
  • api-c.cpp: Print error messages to stderr.
  • iterator-c.cpp: Print error messages to stderr.
  • doc/primesieve.1: Update man page.
  • CMakeLists.txt: Add WITH_MSVC_CRT_STATIC option to force static linking.
  • C_Examples.md: Add CMake build instructions.
  • CPP_Examples.md: Add CMake build instructions.

New in primesieve 7.6 (Jan 8, 2021)

  • The primesieve GUI application has been deprecated/removed. It only works with QT4 which has reached end-of-life.
  • Get rid Travis-CI because it is not free anymore.
  • CpuInfo.cpp: Linux kernel CPU detection has been updated.
  • CpuInfo.cpp: Add workaround for sysctl bug (macOS & iOS).
  • Erat.hpp: Use CTZ instruction on x64 and ARM64 CPUs.
  • config.hpp: Tune FACTOR_ERATSMALL factor.
  • EratSmall.cpp: Get rid of goto.
  • EratSmall.cpp: Optimize switch statement.
  • EratSmall.cpp: Annotate switch cases with fallthrough.
  • EratMedium.cpp: Get rid of goto.
  • EratMedium.cpp: Optimize switch statements.
  • EratMedium.cpp: Annotate switch cases with fallthrough.
  • EratBig.cpp: Simplify main sieving loop.
  • doc/C_Examples.md: libprimesieve C code examples.
  • doc/CPP_Examples.md: libprimesieve C++ code examples.

New in primesieve 7.5 (Dec 27, 2019)

  • Erat.cpp: Silence MSVC debug warning.
  • StorePrimes.hpp: Add workaround for windows.h max/min macros.
  • PrimeGenerator.cpp: Cache more primes.
  • SievingPrimes.cpp: Cache more primes.
  • cmdoptions.cpp: Support options of type: --option VALUE.
  • help.cpp: Improve help menu.
  • CMakeLists.txt: Require CMake 3.4 instead 3.9.
  • primesieve.pc.in: Fix libdir and includedir.
  • README.md: Add libprimesieve multi-threading section.
  • BUILD.md: Add detailed build instructions.
  • doc/ALGORITHMS.md: Info from https://primesieve.org.
  • doc/primesieve.txt: New AsciiDoc man page.

New in primesieve 7.4 (Feb 10, 2019)

  • This release fixes 2 bugs, improves caching of small primes and adds a new test option to the primesieve console application.
  • CpuInfo.cpp: Fix MinGW CPU detection.
  • CMakeLists.txt: Fix cross compilation bug.
  • Add --test option: Runs self tests.
  • IteratorHelper.cpp: Improve caching of small primes.
  • ParallelSieve.cpp: Non-blocking status updates.
  • PrimeSieve.cpp: Simplify status update.
  • Travis.yml: Test using GCC 5, 6, 7, 8, Clang 7 and MinGW.

New in primesieve 7.3 (Jan 5, 2019)

  • EratBig.cpp: Improve cache efficiency.
  • MemoryPoop.cpp: Allocate buckets aligned by sizeof(Bucket).
  • Bucket.hpp: sizeof(Bucket) is now a power of 2.
  • primesieve::iterator: Support C++ move semantics.
  • cmdoptions.cpp: Fix array out of bounds bug.
  • CpuInfo.cpp: Fix MinGW/MSYS2 -Wcast-function-type warning.

New in primesieve 7.2 (Nov 5, 2018)

  • primesieve-7.2 features a new algorithm for medium sieving primes that improves the CPU's branch prediction rate by sorting the sieving primes (before using them). On AMD EPYC CPUs I have measured a speedup of up to 20% and on Intel Skylake CPUs I have measured a speedup of up to 10%. Ever since primesieve was created in 2010 its algorithm for medium sieving primes has been slower than yafu's algorithm for medium sieving primes. This performance issue has now been fixed!

New in primesieve 7.1 Console (Oct 29, 2018)

  • This is a minor new release, the API and ABI (Application binary
  • Interface) are backwards compatible.
  • Primesieve-7.2 features a new algorithm for medium sieving primes
  • That improves the CPU's branch prediction rate by sorting the sieving
  • Primes (before using them). On AMD EPYC CPUs I have measured a
  • Speedup of up to 15% and on Intel Skylake CPUs I have measured a
  • Speedup of up to 10%. Ever since primesieve was created in 2010 its
  • Algorithm for medium sieving primes has been slower than yafu's
  • Algorithm for medium sieving primes. This performance issue has now
  • Been fixed!
  • EratMedium.cpp: New faster sieving algorithm.
  • EratSmall.cpp: Slightly reduce the number of instructions.
  • MemoryPool.cpp: Move memory pool into its own class.
  • CMakeLists.txt: Add support for primesieve.dll.

New in primesieve 7.1 Console (Aug 20, 2018)

  • primesieve-7.1 runs up to 30% faster on Intel Skylake-X CPUs!
  • The default sieve size is now (L2 cache size / 2). Using a sieve size that is slightly smaller than the L2 cache size allows other important data structures to also fit into the L2 cache. This reduces the number of L2 cache misses which improves performance on CPUs with slow L3 caches. primesieve-7.1 will also run slightly faster (< 3%) on most other Intel CPUs.
  • api.cpp: Default sieve size = (L2 cache size / 2).
  • CpuInfo.cpp: Improved CPU info detection.
  • Erat.cpp: Lazy PreSieve initialization.
  • EratSmall.cpp: Fix too large sieve size.
  • help.cpp: Update help menu (--help).
  • ParallelSieve.cpp: Improved load balancing.
  • cpu-info: New option, prints CPU information.
  • Rename kilobytes to KiB because it is more accurate.
  • Faster Windows binary built using clang-cl.

New in primesieve 7.0 Console (Apr 26, 2018)

  • Up until now libprimesieve sieved an interval of size sqrt(n) and stored the primes inside that interval in an array. next_prime() then iterated over the primes in the array. Once there were no more primes available in the array libprimesieve regenerated new primes which incurred an initialization overhead of sqrt(n) * log log sqrt(n) operations to recompute the sieving primes. This initialization overhead has been removed in primesieve-7.0 which gives a 2x speed improvement for next_prime() when iterating over primes ≥ 10^15.

New in primesieve 6.4 Console (Mar 23, 2018)

  • This is a minor new release, the API and ABI are backwards compatible.
  • Switch to https: https://primesieve.org.
  • Faster printing to stdout.
  • Required CMake version is now 3.4 (previously 3.1)
  • CMakeLists.txt: Support find_package(primesieve).
  • CMakeLists.txt: Add Fedora multiarch support.
  • CMakeLists.txt: Fix libatomic detection.
  • CMakeLists.txt: Fix make install issue.
  • calculator.hpp: Fix integer overflow.
  • test/calculator.cpp: Add test for expression parser.
  • Breaking Changes:
  • The 2 changes below may potentially break the build of projects that
  • have hardcoded the src/primesieve path and/or the
  • src/primesieve/README filename in their build script.
  • Move libprimesieve sources from ./src/primesieve to ./src.
  • Rename src/primesieve/README to src/README.md.

New in primesieve 6.2 (Dec 6, 2017)

  • This is a minor new release which fixes 2 bugs and improves
  • the primesieve GUI appThe API and ABI are backwards
  • compatible.
  • pmath.hpp: Fix integer overflow.
  • EratMedium.cpp: Fix vector out of bounds bugs.
  • primesieve GUI app: Silence GCC 7 warnings.
  • PrimeSieveGUI.cpp: Add option to sieve using
  • (CPU cores / 2) threads.

New in primesieve 6.1 (Dec 6, 2017)

  • primesieve-6.1 features run-time CPU cache size detection and
  • an L2 cache size optimization contributed by Huang YuanBing
  • which speeds up sieving by up to 20% on recent CPUs (>= 2012).
  • By default primesieve now uses a sieve size that fits into the
  • CPU's L1 cache for small sieving primes and a sieve size that
  • fits into the CPU's L2 cache for medium and big sieving
  • primes.
  • The API and ABI are backwards compatible.
  • CpuInfo.cpp: Runtime CPU cache size detection.
  • api.cpp: sieve size = L2 cache size.
  • EratSmall.cpp: L1 cache size optimization.
  • EratMedium.cpp: Reduce allocations.
  • Silence GCC 7 warnings.
  • Fix GCC 7 performance regression.

New in primesieve 6.0 (Dec 6, 2017)

  • primesieve-6.0 is a major new release with many changes. The API and
  • ABI are not backwards compatible, see the "API changes" sections
  • further down for more information.
  • Use CMake build system instead of Autotools.
  • Use C++11 instead of C++98.
  • Use C++11 threads instead of OpenMP.
  • C/C++ API is now parallel by default.
  • Add many C/C++ libprimesieve tests (./test).
  • Improved error messages.

New in primesieve 5.0 (Jan 23, 2014)

  • primesieve-5.0 is a major new release that makes using the primesieve
  • library much more convenient. primesieve now includes C bindings for
  • all of its functions so that it can easily be used in languages other
  • than C++. I moved primesieve's build system to GNU Autotools and
  • Libtool which is more reliable than the hand written Makefile I used
  • previously.
  • primesieve-5.0 features a new API completely written from scratch that
  • is easier to use and that will not break binary compatibility with
  • every new release. The new API is not backwards compatible but porting
  • your code to the new API should be done quickly.
  • I bought a domain for primesieve and moved primesieve's repository
  • from Google Code (SVN) to GitHub (git)
  • Other changes:
  • New primesieve::iterator class that provides next_prime() and previous_prime() methods.
  • ParallelPrimeSieve now uses multi-threading by default, it does not care about arithmetic order anymore. Please do not use ParallelPrimeSieve directly anymore instead use the new API.
  • Renamed src/soe to src/primesieve.
  • Renamed PrimeSieveCallback class to Callback.
  • 5. Moved most header files to include/primesieve.

New in primesieve 4.4 (Jan 23, 2014)

  • This is a minor release whose sole purpose is to fix a bug in the Makefile which is required for integrating primesieve into Sage
  • Fixed the following bug: make shared && make install PREFIX=/user-path
  • PrimeSieve does not throw an exception anymore if (start > stop) instead it simply ignores the invalid input.
  • make SHARED=yes` has been deprecated, use `make shared` instead.

New in primesieve 4.3 (Jan 23, 2014)

  • This release improves primesieve as a library and adds an algorithm to find the nth prime. The API of primesieve 4.3 is backwards compatible but the ABI is not (you must recompile your application if you want to link against a shared libprimesieve 4.3)
  • Support for storing primes in C++ vectors:
  • PrimeSieve::generatePrimes (start, stop, std::vector*)
  • PrimeSieve::generate_N_Primes(start, n, std::vector*)
  • New algorithm to find the nth prime PrimeSieve::nthPrime(n) PrimeSieve::nthPrime(start, n)
  • The Makefiles now build primesieve and a static libprimesieve by default. A shared libprimesieve can be built using make shared
  • Added a header for this commonly used exception to abort sieving
  • Updated the documentation files: INSTALL, doc/API, doc/EXAMPLES doc/LIBPRIMESIEVE, doc/FAQ
  • Updated the source code examples in ./examples
  • Added the scripts/install_primesieve.sh shell script that automatically downloads, builds and installs the latest primesieve and libprimesieve version

New in primesieve 4.2 (Jan 23, 2014)

  • libprimesieve generates (callback) primes up to 5% faster on little-endian CPUs (x86, x86-64) due to improved endiansafe_cast.h (src/soe)
  • The best pre-sieve setting is now automatically chosen at runtime, this speeds up sieving small intervals
  • The Makefile now supports the Solaris OS
  • Updated documentation: README, INSTALL, doc/EXAMPLES, doc/FAQ and doc/LIBPRIMESIEVE. New files: AUTHORS and THANKS
  • Fixed a bug in the primesieve GUI code (doc/BUGS)
  • Updated ExpressionParser.h (src/apps/*) to version 2.5
  • Added more example programs: examples/store_primes_in_vector.cpp and examples/nth_prime.cpp
  • Lots of refactoring to make the code easier to understand
  • API changes:
  • The undocumented pre-sieve methods have been removed pre-sieving is now automatically configured at runtime)
  • void PrimeSieve::getPreSieve()
  • void PrimeSieve::setPreSieve(int)

New in primesieve 4.1 (Jan 23, 2014)

  • New PrimeSieveCallback interface class that simplifies prime number generation with classes, see doc/EXAMPLES
  • The primesieve console (terminal) application now supports GNU-style long options e.g. --size=256
  • Fixed a bug (for sizeof(int) > 4) in the bit population count algorithm, read BUGS file
  • Updated files: README, INSTALL, doc/EXAMPLES
  • The Makefile now uses the system's default C++ compiler instead of GNU g++ which makes it more portable
  • The primesieve_error class has been moved into its own file src/soe/primesieve_error.h (previously PrimeSieve.h)
  • API changes:
  • The following two overly complex PrimeSieve methods have been removed:
  • void PrimeSieve::generatePrimes(uint32_t start, uint32_t stop, void (*)(uint32_t, void*), void*)
  • void PrimeSieve::generatePrimes(uint64_t start, uint64_t stop, void (*)(uint64_t, void*), void*)
  • They are replaced by the following two new methods that greatly simplify prime number generation with classes, please refer to doc/EXAMPLES for more information
  • void PrimeSieve::generatePrimes(uint32_t start, uint32_t stop, PrimeSieveCallback*)
  • void PrimeSieve::generatePrimes(uint32_t start, uint32_t stop, PrimeSieveCallback*)

New in primesieve 4.0 (Jan 23, 2014)

  • primesieve 4.0 is a major new release. A lot of work has been put into
  • documentation and improving primesieve as a library. The API of
  • primesieve 4.0 is backward incompatible with primesieve 3.*, the few
  • changes are documented further down:
  • Added support for OpenMP 2.*, useful for compilers that do not support OpenMP >= 3.0, e.g. MSVC, Apple g++
  • New examples directory with 12 simple example programs
  • New doc/API file that lists the public member functions of the PrimeSieve and ParallelPrimeSieve C++ classes
  • The Makefile is now POSIX compatible, it works with any POSIX shell e.g. sh, bash, ash, ksh, zsh
  • The Makefile now supports MinGW (with MSYS) and Cygwin
  • Fixed a shared libprimesieve bug (read doc/BUGS)
  • Up to 10 percent faster prime number generation due to new internal 64-bit getNextPrime() (previously 32-bit)
  • New unsynchronized ParallelPrimeSieve::generatePrimes() method that calls back primes in parallel (read EXAMPLES)
  • Faster thread synchronization in ParallelPrimeSieve, replaced slow OpenMP critical directive with faster omp_test_lock()
  • Optimized prime k-tuplet (twin primes, ...) counting for out-of-order CPUs (src/soe/PrimeNumberFinder.cpp)
  • New primesieve_error() exception used for all exceptions within PrimeSieve and ParallelPrimeSieve (read EXAMPLES)
  • New pre-sieve code (src/soe/PreSieve.cpp)
  • Ported the primesieve GUI application from Qt 4 to Qt 5
  • API changes:
  • The PrimeSieve 3.* count methods:
  • uint64_t getPrimeCount(uint64_t start, uint64_t stop)
  • uint64_t getTwinCount (uint64_t start, uint64_t stop)
  • Have been renamed to:
  • uint64_t countPrimes (uint64_t start, uint64_t stop)
  • uint64_t countTwins (uint64_t start, uint64_t stop)
  • uint64_t countTriplets (uint64_t start, uint64_t stop)
  • uint64_t countQuadruplets(uint64_t start, uint64_t stop)
  • uint64_t countQuintuplets(uint64_t start, uint64_t stop)
  • uint64_t countSextuplets (uint64_t start, uint64_t stop)
  • uint64_t countSeptuplets (uint64_t start, uint64_t stop)

New in primesieve 3.8 (Jan 23, 2014)

  • Improved OOP design of WheelFactorization.h
  • Minor speed up for big sieving primes ~2% (src/soe/EratBig.cpp)
  • reduced the number of operations in the main sieving loop
  • Minor speed up for small sieving primes ~3% (src/soe/EraSmall.cpp)
  • new inner sieving loop without instruction dependencies that uses
  • only 12 asm instructions (previously 16)
  • Improved OpenMP load balance in src/soe/ParallelPrimeSieve.cpp
  • Improved code readability of EratSmall.cpp, EratMedium.cpp
  • EratBig.cpp, SieveOfEratosthenes.cpp and others
  • The Makefile now automatically detects the CPU's L1 data cache
  • size on Unix-like OSes (Linux, Mac OS X)
  • Renamed ./docs to ./doc
  • Revised README.txt, added 7. Motivation
  • Updated INSTALL, LIBPRIMESIEVE and EXAMPLES
  • Added version #defines to PrimeSieve.h, e.g. for this release
  • define PRIMESIEVE_VERSION "3.8"
  • define PRIMESIEVE_MAJOR_VERSION 3
  • define PRIMESIEVE_MINOR_VERSION 8
  • define PRIMESIEVE_YEAR 2012

New in primesieve 3.7 (Jan 23, 2014)

  • More aggressive inlining (*-inline.h), up to 10 percent faster prime number generation, up to 20 percent faster initialization
  • Reduced header file dependencies, libprimesieve now only depends on PrimeSieve.h or ParallelPrimeSieve.h (and PrimeSieve.h)
  • Updated Makefiles
  • New template imath.h functions: isqrt(), ilog2(), isPowerOf2() isqrt() has been rewritten using Newton's algorithm in order to avoid rounding errors of (int)sqrt((double)n) if n > 10^15
  • New internal SieveOfEratosthenes::getNextPrime(...) member function
  • Replaced old C-style comments with C++ comments
  • Updated ExpressionParser to version 2.2 uin32_t has been replaced by uint_t in src/soe/*
  • New int API for PrimeSieve and ParallelPrimeSieve objects, getters and setters now use int instead of uint32_t
  • Updated documentation files: README, INSTALL, LIBPRIMESIEVE EXAMPLES, VALGRIND, TODO, BUGS

New in primesieve 3.6 (May 4, 2012)

  • Built with Intel C++ Compiler 12.1 (Composer XE 2011)
  • Minor speed up for small sieving primes ~ 5%

New in primesieve 2.1 (Apr 19, 2011)

  • Added an arithmetic expression parser to ease number input
  • Supported operators: +,-,*,/,%,^,e Examples: 2^32, 1e18+2e10
  • Fixed a lower bound bug present in version 1.0
  • Use of threads (OpenMP: vcomp90.dll) instead of processes