Twin Primes Segmented Sieve of Zakiya (SSoZ) Explained

Salih Dincer salihdb at hotmail.com
Sat Jun 18 18:28:11 UTC 2022


On Friday, 17 June 2022 at 20:52:11 UTC, Jabari Zakiya wrote:
> I just released this new paper which presents D versions and 
> benchmarks for this agorithm.
>
> Twin Primes Segmented Sieve of Zakiya (SSoZ) Explained
> https://www.academia.edu/81206391/Twin_Primes_Segmented_Sieve_of_Zakiya_SSoZ_Explained

Congratulations, all 25 pages are very clearly written...

>
> Here are the D sources for the code in the paper.
>
> twinprimes_ssoz
> https://gist.github.com/jzakiya/ae93bfa03dbc8b25ccc7f97ff8ad0f61

Some adjustments should be made to highlight D's abilities and 
reduce the number of lines.
```d
int main(string[] args) {
   if(args.length > 1) {
     import std.conv;
     end_num = args[1].to!uint.max(3);
     start_num = args[2].to!uint.max(3);
     twinPrimesSsoz();
   } else {
     import std.stdio : err = stderr;
     err.writefln("Please input:\n %s 3 7919", args[0]);
     return 1;
   }
   return 0;
}
```
Line number increased though, sorry...

SDB at 79


More information about the Digitalmars-d mailing list