mersenneforum.org  

Go Back   mersenneforum.org > Prime Search Projects > Twin Prime Search

Reply
 
Thread Tools
Old 2010-06-12, 08:32   #23
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

2·19·73 Posts
Default

Quote:
Originally Posted by axn View Post
Hmmm... How much time did the sieve take to get to 4e4? 1e6? 10e6?

I am asking because I am "fairly confident" that I can write a custom sieve that can sieve a range of k's to 1e6 (or even 10e6) much faster than NewPGen can. NewPGen isn't really optimised for the initial sieving.
It took 13 hours to get to 4e4. It took about 56 hours to go from 4e4 to 1e6. It is currently still sieving at 27e6 with 4.8M k's remaining (15 hours from 1e6).

By comparison letting NewPGen do the split at p=1e9 took 42.5 hours to 1e9 and another 10.5 hours to go from 1e9 to 100e9.
amphoria is offline   Reply With Quote
Old 2010-06-12, 16:57   #24
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

2×19×73 Posts
Default

Quote:
Originally Posted by amphoria View Post
It took 13 hours to get to 4e4. It took about 56 hours to go from 4e4 to 1e6. It is currently still sieving at 27e6 with 4.8M k's remaining (15 hours from 1e6).
It took 23.5 hours to go from 1e6 to 1e9.
amphoria is offline   Reply With Quote
Old 2010-06-14, 03:41   #25
axn
 
axn's Avatar
 
Jun 2003

2×34×29 Posts
Default

I've got a preliminary sieve cooked up. Currently it sieves a 1T range to 50e6 in around 1.2 hrs (C2D 2 GHz. Linux 64-bit).

Undergoing testing. Once testing checks out, assuming there is interest, I will post the code here.
axn is offline   Reply With Quote
Old 2010-06-14, 06:43   #26
Oddball
 
Oddball's Avatar
 
May 2010

499 Posts
Default

Quote:
Originally Posted by axn View Post
I've got a preliminary sieve cooked up. Currently it sieves a 1T range to 50e6 in around 1.2 hrs (C2D 2 GHz. Linux 64-bit).

Undergoing testing. Once testing checks out, assuming there is interest, I will post the code here.
Wow, that's pretty fast. Were you using one core or both of them?
Oddball is offline   Reply With Quote
Old 2010-06-14, 12:27   #27
Flatlander
I quite division it
 
Flatlander's Avatar
 
"Chris"
Feb 2005
England

40358 Posts
Default

@axn
Brilliant!
I assume someone will be able to port it to Windows, 64 bit?

Last fiddled with by Flatlander on 2010-06-14 at 12:28
Flatlander is offline   Reply With Quote
Old 2010-06-14, 12:53   #28
axn
 
axn's Avatar
 
Jun 2003

10010010110102 Posts
Default

Quote:
Originally Posted by Oddball View Post
Wow, that's pretty fast. Were you using one core or both of them?
One core.

Quote:
Originally Posted by Flatlander View Post
@axn
Brilliant!
I assume someone will be able to port it to Windows, 64 bit?
It's written in pascal. Will compile under free pascal (they have 32-bit & 64-bit compilers for windows and linux)
axn is offline   Reply With Quote
Old 2010-06-14, 17:00   #29
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

2·2,861 Posts
Default

It looks to me that pascal is not as fast as c++.
http://shootout.alioth.debian.org/u32/pascal.php
henryzz is offline   Reply With Quote
Old 2010-06-14, 17:10   #30
axn
 
axn's Avatar
 
Jun 2003

111328 Posts
Default

Quote:
Originally Posted by henryzz View Post
It looks to me that pascal is not as fast as c++.
http://shootout.alioth.debian.org/u32/pascal.php
I agree, in general. However, the siever spends ~99% of its time in about 15 lines of code which are written in assembly. Even there, I haven't bothered with too much optimization.

The program is simple enough to be ported to any language without much trouble -- but unless you're an assembly expert, you'll find little gain.

EDIT:- More gains can be made from a more complex algorithm. However, the current gains (vis-a-vis Newpgen) are good enough that I can't justify spending more time on performance. My current focus is on increasing the p limit, so that the time spend on sieving by Newpgen is minimized.

Last fiddled with by axn on 2010-06-14 at 17:13
axn is offline   Reply With Quote
Old 2010-06-14, 17:28   #31
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

1010110101102 Posts
Default

Quote:
Originally Posted by axn View Post
I've got a preliminary sieve cooked up. Currently it sieves a 1T range to 50e6 in around 1.2 hrs (C2D 2 GHz. Linux 64-bit).

Undergoing testing. Once testing checks out, assuming there is interest, I will post the code here.
Are you sieving for both Twins and Sophie Germains?
amphoria is offline   Reply With Quote
Old 2010-06-14, 18:06   #32
axn
 
axn's Avatar
 
Jun 2003

2×34×29 Posts
Default

Quote:
Originally Posted by amphoria View Post
Are you sieving for both Twins and Sophie Germains?
Yep. Exploiting the fact that k should be multiple of both 3 and 5.
axn is offline   Reply With Quote
Old 2010-06-14, 23:37   #33
axn
 
axn's Avatar
 
Jun 2003

2×34×29 Posts
Default

Ok. Here's the source code.

Currently sieves 1T upto p=100e6 in 50 minutes. Experiment with tweaking the two parameters in the file.

If you can't download Free Pascal to compile it, I can try compiling for Win64/Linux64 and post the binaries.

EDIT:- Could use more testing. Bug reports welcome.
Attached Files
File Type: txt LuckyMinus.pas.txt (8.0 KB, 224 views)

Last fiddled with by axn on 2010-06-14 at 23:38
axn is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perpetual benchmark thread... Xyzzy Hardware 821 2020-09-12 23:56
Hardware Benchmark Jest Thread for 100M exponents joblack Hardware 275 2019-08-04 21:07
LLR benchmark thread Oddball Riesel Prime Search 5 2010-08-02 00:11
sr5sieve Benchmark thread axn Sierpinski/Riesel Base 5 25 2010-05-28 23:57
New Sieve Thread Discussion Citrix Prime Sierpinski Project 15 2005-08-29 13:56

All times are UTC. The time now is 04:47.

Tue Sep 29 04:47:50 UTC 2020 up 19 days, 1:58, 0 users, load averages: 1.13, 1.22, 1.40

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.