primesieve icon indicating copy to clipboard operation
primesieve copied to clipboard

🚀 Fast prime number generator

Results 6 primesieve issues
Sort by recently updated
recently updated
newest added

I started primesieve in 2010 and primecount in 2013. Since the beginning, my goal for primesieve and primecount was to write libraries that are extremely specialized i.e. primesieve should generate...

Just ran this ``` cmake -G "Unix Makefiles" . make -j ``` Error: ``` C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/libprimesieve.dir/src/api-c.cpp.obj:api-c.cpp:(.text+0x279): undefined reference to `__cxa_free_exception' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/libprimesieve.dir/src/api-c.cpp.obj:api-c.cpp:(.text+0x293): undefined reference to `__cxa_begin_catch' C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/libprimesieve.dir/src/api-c.cpp.obj:api-c.cpp:(.text+0x2b2): undefined reference...

```primesieve::iterator```'s performance depends heavily on the ```fillNextPrimes()``` method from ```PrimeGenerator.cpp```. For x64 we have a [vectorized AVX512 algorithm](https://github.com/kimwalisch/primesieve/blob/c2c56e5b01478f6cf8cbfc10443156c482362fab/src/PrimeGenerator.cpp#L349) that is pretty optimal for this task. Once other CPU architectures (e.g....

I tried to enable unity build in order to speed up the build of my packages, and primesieve faild with: ``` PrimeSieve.cpp:36:40: error: conflicting declaration 'const primesieve::Array {anonymous}::smallPrimes' 36 |...

I tried AVX512 pre-sieving using the 2 algorithms below. On AMD EPYC 4th gen CPUs (Genoa) I saw no speedup using both GCC and Clang (compared to the default SSE2...

> The ```__AVX512F__```, ```__AVX512CD__```, ```__AVX512BW__```, ```__AVX512DQ__``` and ```__AVX512VL__``` preprocessor symbols are defined when the ```/arch:AVX512``` compiler option is specified. According to the Microsoft MSVC website https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170 the support of AVX512...