![]() |
|
|
#232 |
|
Jan 2005
Caught in a sieve
5·79 Posts |
From what I've seen on my Core 2 Quad, I got about a 2x speedup from a better memory access pattern, then a 3x speedup on top of that, for 32-bit only, from SSE2. So if 6x is expected, I suppose 7-8x isn't unreasonable.
I'm kind of in shock, too. But Geoff always said his code wasn't optimized for this many N's. |
|
|
|
|
|
#233 | |
|
Jun 2003
23×683 Posts |
Quote:
|
|
|
|
|
|
|
#234 |
|
Jan 2005
Caught in a sieve
5·79 Posts |
There doesn't seem to be a way to supresss the factor output to the screen. (Yet.) But you can add "> NUL" at the end on Windows ("> /dev/null" on Linux) to get rid of the output from any app.
I'm thinking next I should look at profiling the program. I can't think of a reason increasing P like that would speed it up, except maybe that factor output is more expensive than I realized. |
|
|
|
|
|
#235 | |
|
Jun 2003
546410 Posts |
Quote:
False alarm. For some odd reason, it was only considering the first 2000 or so n's. The memory usage was around 400mb, and the factor density was much less. Wasted 2 hrs. Anyway, rerunning the range from start, and now it is back to around 1.45M (still faster than at 30G, but only slightly). I would still love to see if there is any potential speed gains from suppressing the screen output. Can you make a version with the relevant code commented out? Last fiddled with by axn on 2009-08-12 at 03:33 |
|
|
|
|
|
|
#236 |
|
Mar 2003
New Zealand
13×89 Posts |
I've uploaded tpsieve 0.2.4 at http://www.geocities.com/g_w_reynolds/testing/ which just fixes the bug that prevented the proper nmax value being set ffrom a multi-n input file.
I don't have much time online at the moment, so I can't respond to all the issues about the program. But note that the multithreading is not ideal, only one thread at a time can be in certain parts of the prime generation code, so for benchmarking purposes it is best to use just a single thread. As the range of n changes, and also as the factor size changes, you will need to adjust the --qmax parameter to suit. (larger range of n and/or larger factor range should use a larger --qmax). Memory use can be reduced by using a hashtable instead of a bitmap, and reduced more by using a type of binary search of an ordered list, but there will be some performance tradeoff. Anyway the source code is there, feel free to make changes. Edit: The version numbering for source and binary are different, because I use the source to build a number of programs that share some of the code. Edit2: The compiler I use for the 64-bit Windows executable is available here http://mingw-w64.sourceforge.net/ It can be used from Linux to produce Windows executables. Last fiddled with by geoff on 2009-08-12 at 03:59 |
|
|
|
|
|
#237 | |
|
Jan 2005
Caught in a sieve
5×79 Posts |
Quote:
axn, is it possible that you gave the wrong value for the -N argument? (The new version doesn't need that.) If that's not what happened, could you please PM me with the command line you used, if you have it? (In case you didn't know, pressing the up arrow at the same command prompt might show it.) |
|
|
|
|
|
|
#238 |
|
Feb 2007
211 Posts |
|
|
|
|
|
|
#239 |
|
I quite division it
"Chris"
Feb 2005
England
31·67 Posts |
I'm fiddling with tpsieve trying to get the hang of it. I now have a file tpfactors.txt that I want to remove from allc.txt but srfile doesn't like the file type. How do I remove the factors?
(100 ns in file. Windows.) |
|
|
|
|
|
#240 |
|
Feb 2007
D316 Posts |
Flatlander check with gribozavr he has a perl script, to do that.
|
|
|
|
|
|
#241 | |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
11×389 Posts |
Quote:
![]() Can -q be set in tpconfig.txt? If so, would it be with -q or q or what? Last fiddled with by TimSorbet on 2009-08-12 at 12:42 |
|
|
|
|
|
|
#242 | |
|
Jun 2003
23×683 Posts |
Quote:
Code:
<sse2-exe> -i <480kfile> -p 1e11 -P 2e11 -N 485000 Last fiddled with by axn on 2009-08-12 at 13:28 |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| S9 and general sieving discussion | Lennart | Conjectures 'R Us | 31 | 2014-09-14 15:14 |
| Sieving discussion thread | philmoore | Five or Bust - The Dual Sierpinski Problem | 66 | 2010-02-10 14:34 |
| Combined sieving discussion | ltd | Prime Sierpinski Project | 76 | 2008-07-25 11:44 |
| Sieving Discussion | ltd | Prime Sierpinski Project | 26 | 2005-11-01 07:45 |
| Sieving Discussion | R.D. Silverman | Factoring | 7 | 2005-09-30 12:57 |