So here is my version of a [Maximally Factorized Sieve of Eratosthenes 
Benchmark as an Android 
app](https://github.com/GordonBGood/SieveofEratosthenesBenchmark) using an 
algorithm which is at least as fast as [Kim Walich's 
primesieve](https://github.com/kimwalisch/primesieve) on platforms on which 
they run in common up to the range of about 65 billion or so; it lacks the 
optimizations for more efficient sieving above this point in order to keep the 
code simpler and easier to understand. The required optimizations in order to 
extend the range to be the same are explained in the README file of the repo.

This work was done to show that one doesn't need to write code in C/C++ in 
order to be fast as per [a Quora question on prime 
sieving](https://www.quora.com/Can-you-write-a-C-program-that-finds-all-prime-numbers-from-2-to-2-billion-in-under-1-second-on-an-average-500-PC),
 but the Quorum Moderators didn't accept my 
[answer](https://www.quora.com/Can-you-write-a-C-program-that-finds-all-prime-numbers-from-2-to-2-billion-in-under-1-second-on-an-average-500-PC/answer/W-Gordon-Goodsman),
 likely because it uses Nim rather than C++ and shows that it doesn't take a 
€500 PC to perform the task of sieving to two billion in under one second but 
that it can be done on the least expensive of currently available smartphones 
and not using C++.

You can try this app by [downloading the zip file from 
here](https://github.com/GordonBGood/SieveofEratosthenesBenchmark/blob/master/app/release/SoEBenchmarkAndroid.zip),
 extracting the APK file, and side loading the APK file to an Android 
smartphone. The results should look something like the following:

> 

Reply via email to