Prime pattern 6 +/- 1
#9
Quote:Are you certain that 20 second time is correct?

For first 100,000,000 integers the 6 wheeler takes 2.5+ secs as posted in reply #6 to david_uwi in current QB64 v0.8.2 with compiler optimized. David's takes even less time, 1.5 secs on my system, but I don't think he is saving first factor information like I am to actually use the prime/composite array for something practical like factoring numbers.

The 20 secs time was back in 2017 probably on my old dinosaur laptop and old version of QB64.

If you are using the test: if pc mod p = 0 then pc is prime (prime candidate mod prime = 0 ie p divides pc), that is very slow test.
b = b + ...
Reply


Messages In This Thread
Prime pattern 6 +/- 1 - by SMcNeill - 06-30-2022, 10:49 AM
RE: Prime pattern 6 +/- 1 - by bplus - 06-30-2022, 12:25 PM
RE: Prime pattern 6 +/- 1 - by bplus - 06-30-2022, 12:29 PM
RE: Prime pattern 6 +/- 1 - by david_uwi - 06-30-2022, 12:46 PM
RE: Prime pattern 6 +/- 1 - by bplus - 06-30-2022, 01:32 PM
RE: Prime pattern 6 +/- 1 - by david_uwi - 06-30-2022, 02:39 PM
RE: Prime pattern 6 +/- 1 - by triggered - 07-01-2022, 11:29 AM
RE: Prime pattern 6 +/- 1 - by SMcNeill - 07-01-2022, 11:40 AM
RE: Prime pattern 6 +/- 1 - by bplus - 07-01-2022, 12:51 PM
RE: Prime pattern 6 +/- 1 - by bplus - 07-01-2022, 01:06 PM
RE: Prime pattern 6 +/- 1 - by bplus - 07-01-2022, 01:15 PM
RE: Prime pattern 6 +/- 1 - by david_uwi - 07-01-2022, 03:55 PM
RE: Prime pattern 6 +/- 1 - by triggered - 07-07-2022, 10:46 AM



Users browsing this thread: 5 Guest(s)