20140102, 21:54  #1 
1976 Toyota Corona years forever!
"Wayne"
Nov 2006
Saskatchewan, Canada
1000101001101_{2} Posts 
ECM vs P1.
I seem to recall a post about a year ago where someone said doing a P1 is like doing all ECM curves at once for the same B1/B2. Now if I misunderstood then the rest of this post might be gibberish.
If I am on the right track then it would lead me to believe they run a very similar code base and should perform equally. However, I have a PC (granted old) that can do almost 2 GhzDays per day of P1 and less than 1.5 of ECM. If relevant the P1 was in the 64M range and ECM on Fermat 13 (8192). 
20140102, 22:58  #2  
Nov 2003
2^{6}·113 Posts 
Quote:
take the time and effort to learn how these algorithms actually work??? Or are you part of the IGG that is too lazy or unmotivated to be bothered with something as trite as learning about this subject? Quote:
I will assume that you mean "P1" when you write P1. (1) Where did you get the idea that running P1 was equivalent to doing all ECM curves at once? Running P1 is equivalent to running a single elliptic curve. (2) Comparing ECM running on a number of 5678 digits versus running P1 on a number of 44million digits is meshugah. Furthermore, I suspect that you were not running an FFT Stage 2 for P1. Its memory requirements are so vast that the machine would be paging continuously. A machine running at (say) 2Ghz will yield 2Ghz days of CPU time per day unless it is busy paging. I expect that ECM was doing some paging and that you were only running Stage 1 of P1. If not, please say what B1/B2 limits you were using. Were you using a GPU? How much memory does the machine have? 

20140102, 23:06  #3  
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts 
Quote:
I'd say instead that: In P1 factoring, you are interested in the factorization of the number 1 less than P (). In ECM you are interested in the factorization of some specific number where is about the size of , (something like , which, roughly, means that the first half of the digits are the same as P and the rest are random) and can be calculated by a function where . Being able to choose different sigmas means that it's something like being able to run P1 multiple times. Which means that P1 is like running a single curve of ECM where . For Mersenne and Fermat numbers, this happens to nicely coincide with known facts about what their factors can be, making it much more efficient than ECM at similar bounds. Quote:
Quote:
Another smaller variable: What FFT size was being used in each test? Different CPUs can scale the speeds at different FFT sizes differently. At a guess, your assigned memory or memory bandwidth is lower than the reference machine's. You might be able to improve this by upping the memory Prime95 can use, and using the fastest dualchannel memory configuration possible for your setup. Last fiddled with by MiniGeek on 20140102 at 23:10 

20140102, 23:10  #4 
If I May
"Chris Halsall"
Sep 2002
Barbados
22106_{8} Posts 

20140102, 23:27  #5  
1976 Toyota Corona years forever!
"Wayne"
Nov 2006
Saskatchewan, Canada
43·103 Posts 
Quote:


20140102, 23:54  #6 
Nov 2003
2^{6}·113 Posts 
1G is simply not enough memory for running Step 2 of either P1
or ECM in an efficient manner. What code are you using? Are you using GMPECM? It allows one to limit memory usage in Step 2 by partitioning the data that is generated into pieces. Of course, one pays a penalty for this partitioning. How much of a penalty depends on the size of the pieces relative to the amount of total memory. Your computer is simply underpowered and undersized by current standards. You would be well advised to spend a few bucks and buy more memory. For (say) $50 you will enhance your performance by a fair bit. 
20140102, 23:59  #7  
Nov 2003
1C40_{16} Posts 
You wrote in response:
Quote:
Lack of fundamentals is correctable. It just requires motivation and dedication. We can help guide you. How much mathematics have you studied? Do you have a STEM degree? How well did you do in your math classes in high school? 

20140103, 01:26  #8 
May 2013
East. Always East.
1727_{10} Posts 
Message deleted by TheMawn
Last fiddled with by TheMawn on 20140103 at 01:28 Reason: Duplicate Post somehow 
20140103, 01:28  #9  
May 2013
East. Always East.
3277_{8} Posts 
Quote:
I've never fully understood that math either. I visit the P1 and ECM pages on the mersenne wiki but I never get very far. I'll follow this discussion along out of curiosity. 

20140103, 03:49  #10  
1976 Toyota Corona years forever!
"Wayne"
Nov 2006
Saskatchewan, Canada
43·103 Posts 
Quote:
A University degree in Computer Science minoring in Math was completed 33 years ago. 33 years of IT work devoid of Math pretty much rusted all the math brain cells. Don't know what STEM is. And with a full time job still going; a wife and 4 kids and 3 grandkids and a hobby in music....as much as I would love to learn more about this stuff ... can't do it at this time That is why I need to concede that the best I can do is ask questions and hope someone is willing to give a quick and simple answer. Sorry...and thanks again. P.S. I agree that I should give this PC a proper burial. Plans are underway; in the meantime I hear CheeseHead "100.01 MPH > 100 MPH" Last fiddled with by petrw1 on 20140103 at 03:50 

20140103, 10:46  #11  
Nov 2003
2^{6}·113 Posts 
Quote:
simple. As in this case. Understanding the performance of ECM and P1 require fairly deep understanding not only of their underpinnings but also of computer architecture. Music? Consider how long it takes to learn to play (say) Chopin on the piano. People are willing to devote time to things they like. However, everyone here while claiming to be interested in this subject always show disdain for taking the time to learn it. 
