Click here to Skip to main content
15,902,840 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
Member 419459328-Nov-08 9:03
Member 419459328-Nov-08 9:03 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
PIEBALDconsult28-Nov-08 10:46
mvePIEBALDconsult28-Nov-08 10:46 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
Luc Pattyn28-Nov-08 11:01
sitebuilderLuc Pattyn28-Nov-08 11:01 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes [modified] Pin
PIEBALDconsult29-Nov-08 4:13
mvePIEBALDconsult29-Nov-08 4:13 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
Member 41945934-Jan-09 16:56
Member 41945934-Jan-09 16:56 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
Member 41945935-Jan-09 11:06
Member 41945935-Jan-09 11:06 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
Luc Pattyn28-Nov-08 11:33
sitebuilderLuc Pattyn28-Nov-08 11:33 
AnswerRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
PIEBALDconsult2-Dec-08 3:45
mvePIEBALDconsult2-Dec-08 3:45 
I have it working for up to the first six primes, but it appears that using the first three offers the best performance (to 2^32):

C:\>Eratosthenes 4294967296 Zero
Target=4294967296; Spokes=(1,1); Bytes=(536870920,536870920); Elapsed=00:21:24.1512386; Primes=203280221

C:\>Eratosthenes 4294967296 One
Target=4294967296; Spokes=(2,1); Bytes=(268435464,268435464); Elapsed=00:09:32.2740256; Primes=203280221

C:\>Eratosthenes 4294967296 Two
Target=4294967296; Spokes=(6,2); Bytes=(89478488,178956976); Elapsed=00:05:51.1191606; Primes=203280221

C:\>Eratosthenes 4294967296 Three
Target=4294967296; Spokes=(30,8); Bytes=(17895704,143165632); Elapsed=00:04:53.7847739; Primes=203280221

C:\>Eratosthenes 4294967296 Four
Target=4294967296; Spokes=(210,48); Bytes=(2556536,122713728); Elapsed=00:07:46.0915766; Primes=203280221

C:\>Eratosthenes 4294967296 Five
Target=4294967296; Spokes=(2310,480); Bytes=(232416,111559680); Elapsed=00:41:44.5200097; Primes=203280221

And when I tried it using the first six it ran overnight before I killed it. Dead | X|


I still have more to do on it.
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
Luc Pattyn2-Dec-08 22:14
sitebuilderLuc Pattyn2-Dec-08 22:14 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
73Zeppelin2-Dec-08 22:28
73Zeppelin2-Dec-08 22:28 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
Luc Pattyn2-Dec-08 23:15
sitebuilderLuc Pattyn2-Dec-08 23:15 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
73Zeppelin3-Dec-08 0:14
73Zeppelin3-Dec-08 0:14 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
PIEBALDconsult3-Dec-08 4:11
mvePIEBALDconsult3-Dec-08 4:11 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
Luc Pattyn3-Dec-08 5:45
sitebuilderLuc Pattyn3-Dec-08 5:45 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
PIEBALDconsult3-Dec-08 16:16
mvePIEBALDconsult3-Dec-08 16:16 
GeneralA la recherche des nombres premiers Pin
Luc Pattyn3-Dec-08 16:37
sitebuilderLuc Pattyn3-Dec-08 16:37 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
PIEBALDconsult3-Dec-08 5:06
mvePIEBALDconsult3-Dec-08 5:06 
GeneralRe: Wheel Factorization to simplify a Sieve of Eratosthenes Pin
Luc Pattyn3-Dec-08 5:53
sitebuilderLuc Pattyn3-Dec-08 5:53 
AnswerRe: Wheel Factorization to simplify a Sieve of Eratosthenes [modified] Pin
PIEBALDconsult9-Jan-09 11:53
mvePIEBALDconsult9-Jan-09 11:53 
QuestionEfficient Search/Comparison Algorithm Pin
SanchitK20-Nov-08 3:29
SanchitK20-Nov-08 3:29 
AnswerRe: Efficient Search/Comparison Algorithm Pin
Member 419459320-Nov-08 6:17
Member 419459320-Nov-08 6:17 
AnswerRe: Efficient Search/Comparison Algorithm Pin
Alan Balkany20-Nov-08 10:20
Alan Balkany20-Nov-08 10:20 
AnswerRe: Efficient Search/Comparison Algorithm Pin
cmk20-Nov-08 12:59
cmk20-Nov-08 12:59 
GeneralRe: Efficient Search/Comparison Algorithm Pin
Member 419459320-Nov-08 14:18
Member 419459320-Nov-08 14:18 
GeneralRe: Efficient Search/Comparison Algorithm Pin
cmk20-Nov-08 16:21
cmk20-Nov-08 16:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.