20120210, 04:01  #12 
P90 years forever!
Aug 2002
Yeehaw, FL
2×3^{3}×151 Posts 
Dubslow's response is essentially correct. This isn't an interesting mathematics optimization problem, rather a mundane programming optimization problem. I'm looking for a fast function that quickly, but not necessarily super accurately, simulates prime95's existing P1 bounds generator over a range of values that the typical prime95 user encounters.
I forget all the details, but I received a bug report that accurately generating these optimal bounds on hundreds of assignments was causing problems at startup (sending expected completion dates to the server). This seemed like a potential quick and dirty fix. 
20120210, 07:20  #13 
"Richard B. Woods"
Aug 2002
Wisconsin USA
1111000001100_{2} Posts 
I like the idea of saving:
1) a time estimate (not actual ETA, which would get mixed up if worktodo lines are rearranged/removed/added) and 2) (except for "Pminus1" where B1/B2 are specified) algorithmic B1/B2 bounds ^{*} for each P1 assignment in the worktodo line for that individual assignment The first time these are calculated the long way, store them in the worktodo line. Then just read them out after that, unless something forces recalculation of bounds/time. Computing fresh ETAs each time, based on the stored time estimates, would be trivial. This way, only the new assignments that have been added since the preceding request for ETAs would need to go through the full optimization algorithm to produce the ETA listing.    ^{*} If a particular worktodo line's assignment had not yet actually started, there wouldn't exist any save file with the bounds in it. Last fiddled with by cheesehead on 20120210 at 07:29 
20120210, 09:12  #14 
"Bob Silverman"
Nov 2003
North of Boston
2^{2}×1,877 Posts 

20120210, 09:18  #15  
"Bob Silverman"
Nov 2003
North of Boston
2^{2}·1,877 Posts 
Quote:
minimal time) And the question that you ask now is different from what was asked originally. The true question should be how to optimize the "existing P1 bounds generator over a range of values that the typical prime95 user encounters." and that question IS a mathematical one. As for a fast function, just use table lookup combined with some simple interpolation. 

20120210, 09:37  #16  
Dec 2007
Cleves, Germany
2×5×53 Posts 
Quote:
Problem: Assignments finish faster than bounds can be calculated, and submitting a result triggers bounds calculation. If I had set the machine to automatically communicate with PrimeNet, it would (a) never finish communicating and (b) permanently use half a core for nothing useful  it has enough work such that it will not request more and little enough that it won't unreserve anything. 

20120210, 13:32  #17  
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 89<O<88
3·29·83 Posts 
Quote:
Quote:
Quote:
Last fiddled with by Dubslow on 20120210 at 13:33 

20120211, 18:33  #18  
Jun 2003
2221_{8} Posts 
Quote:
Input Available Memory, number of bits Trial Factored, number of LL's already completed. Output optimal B1,B2, where the quantity to be optimised (minimised) is the expected running time to clear the exponent, either by finding a factor, or by completing two matching LL tests. Assumptions: No further factorisation (either TF or some other method) will be attempted after P1 but before the final LL. The LL will be done on the same machine as the P1 As I have remarked on many occasions, for people doing P1 work specifically (as opposed to people P1ing exponents they are going to LL), these assumptions aren't valid. Additionally, for these people, the quantity the client tries to optimise is, well, nonoptimal. Instead of trying to minimise the expected time to clear an exponent, it should be trying to maximise the expected time saving per unit time expended by me, where "expected time saving" means the difference between the expected time the average machine will take to clear the assignment if I don't do the P1 first and if I do. 

20120212, 18:07  #19 
Jun 2003
2^{2}·3^{2}·151 Posts 
Ok. Very crude first attempt. Assumes "tests saved" is two. For "tests saved" = 1, you can halve the output, I guess. Error is roughly within +/10% ( for about 95% of the cases). Only calibrated within 25m < p < 75m. No idea how good it will be outside this range.
EDIT: Produces rubbish values way outside the calibration range Last fiddled with by axn on 20120212 at 18:17 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Most Wanted  rogue  FermatSearch  35  20210315 14:06 
Fibonacci Formula  MattcAnderson  Math  7  20130114 23:29 
Most wanted  kar_bon  Riesel Prime Data Collecting (k*2^n1)  15  20110809 16:50 
New LLT formula  hoca  Math  7  20070305 17:41 
100 Most Wanted  Citrix  Factoring  24  20040222 01:05 