![]() |
|
|
#243 |
|
"Mark"
Apr 2003
Between here and the
1CAD16 Posts |
I cannot speak for llr as I do not maintain it.
pfgw is best suited for whatever llr cannot do. It is also best suited to do primality testing on forms that other programs can only do a PRP test on, such as genefer/geneferocl. The mtsieve framework is here. There are a nearly 20 sieving programs based upon it including srsieve2 (not to be confused with sr2sieve), which you can d/l from the aforementioned link. |
|
|
|
|
|
#244 | |
|
Random Account
Aug 2009
Not U. + S.A.
54538 Posts |
Quote:
I found the mfsieve collection late yesterday evening. I was amazed as to how many different programs are in the archive. Without any general description, it is difficult to determine what each does. |
|
|
|
|
|
|
#245 |
|
Jun 2003
10101010110002 Posts |
|
|
|
|
|
|
#246 | |
|
"Mark"
Apr 2003
Between here and the
734110 Posts |
Quote:
I actually think that writing a sieve for Sophie-Germain primes would be fairly easy as it could use a lot of the same logic in twinsieve. What program do people use for sieving Sophie-Germain primes? I could easily see if building such a sieve in the mtsieve framework has value. |
|
|
|
|
|
|
#247 |
|
"Curtis"
Feb 2005
Riverside, CA
2×2,927 Posts |
I used a fixed-n sieve in NewPGen. I haven't looked for SG primes in quite a few years, though.
|
|
|
|
|
|
#248 |
|
"Mark"
Apr 2003
Between here and the
1CAD16 Posts |
|
|
|
|
|
|
#249 | |
|
Random Account
Aug 2009
Not U. + S.A.
3·953 Posts |
I stand corrected. I was unable to see the difference.
Quote:
|
|
|
|
|
|
|
#250 | |
|
Jun 2003
22·11·37 Posts |
Quote:
Using a Q value ~ 2500 this can be reduced to a range of around 4096. I get a speed up of 2.5 times. Much lower than expected. Looking through the source code of all 3 programs. Some suggestions:- 1. There is too much overhead in all 3 programs. Most of the specializations theoretically should make the program faster but I think they are making it slower. Simplifying the code might make it faster. 2. In Mtsieve there is a function GenericSubsequenceHelper::FindBestQ() A better Q can be found using gcd. There are simpler ways of finding best Q. The best theoretical Q might not always be the fastest. 3. For the babystep and giantstep code, using a hashmap/bitmap instead of a hashtable can make the program much faster with no significant extra memory use. 4. The program (srsieve2) can be ported to a GPU in most cases (as long as the range is not too large or the weight is extremely low). For low weight sequences a GPU version will be very helpful as they cannot be sieved very far on the CPU. Let me know if you are interested in implementing any of the above and need help. Thanks. Last fiddled with by Citrix on 2020-04-23 at 04:59 |
|
|
|
|
|
|
#251 | |
|
"Mark"
Apr 2003
Between here and the
3·2,447 Posts |
Quote:
As for #1, I'm not certain if you are referring to srsieve2 or srsieve/sr1sieve/sr2sieve. If srsieve2, I'm open to suggestions. Note that I aim for easy of development/support over speed. Sacrificing up to 1 percent to achieve that is acceptable because I can typically make up for it in other areas. Also for srsieve2, it is still a work in progress. You have probably noticed that it is designed to switch the helper/worker if certain conditions are met as each helper/worker will have very different logic meant to optimize in certain ways. As for #3, I did try to implement a hashmap, but the performance was worse. I didn't dig into determining why as the implementation I had was supposed to be one of the fastest. As for #4, it is on my radar, but I haven't don anything yet. My focus has been on implementing the Legendre tables that sr1sieve and sr2sieve have, but bsgs code using those tables a hornet's nest. I'm open to any suggestions. If you want to play around with the code and try your hand at some optimizations, I'm all for it. To continue this, we can either move this discussion to the mtsieve thread, to a new thread, or take offline via PM or e-mail. If we keep it online then other participants of this forum can add their knowledge to the discussion or can learn from it. |
|
|
|
|
|
|
#252 |
|
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
3×23×89 Posts |
|
|
|
|
|
|
#253 |
|
"Mark"
Apr 2003
Between here and the
3×2,447 Posts |
I created this thread for mtsieve improvemets.
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sieving twins with srsieve | henryzz | Twin Prime Search | 0 | 2014-03-18 12:44 |
| Intel announces multi-core enhancements for Haswell chips | ixfd64 | Hardware | 8 | 2012-02-10 20:32 |
| LLRnet enhancements | kar_bon | No Prime Left Behind | 10 | 2008-03-28 11:21 |
| TODO list and suggestions/comments/enhancements | Greenbank | Octoproth Search | 2 | 2006-12-03 17:28 |
| Suggestions for future enhancements | Reboot It | Software | 16 | 2003-10-17 01:31 |