![]() |
|
|
#155 |
|
Mar 2006
Germany
22·727 Posts |
Oh, I see.
He mentioned several times, learning ASM but I think he needs first some basics in programming! [lifting up hat] Your patience is marvellous. |
|
|
|
|
|
#156 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Quote:
I give up I'm hopeless when I found something acting up in his code I couldn't even figure it out. also I've tried the stuff in private but why post things that aren't worth while. edit:just found it while beat CRG's code by about 31 ms for the equivalent of doing 1-1000,but I found it slows down a lot as his code by 100000 is like 3 times as fast to check half as much ? for(c=2,500,for(n=0,c-3,if(isprime(c-n) && isprime(c+n),print(c","n);break()))) anyway you can speed this up ? Last fiddled with by science_man_88 on 2010-07-23 at 22:21 |
|
|
|
|
|
|
#157 |
|
Aug 2006
175B16 Posts |
|
|
|
|
|
|
#158 |
|
"Forget I exist"
Jul 2009
Dumbassville
100000110000002 Posts |
|
|
|
|
|
|
#159 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
|
|
|
|
|
|
|
#160 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
yes but if I don't break after the first one I have to waste time finding more of them for each c value.
Last fiddled with by science_man_88 on 2010-07-24 at 17:24 |
|
|
|
|
|
#161 |
|
Aug 2006
3×1,993 Posts |
Notice that c and n need to be of opposite parity... that'll save a few cycles.
|
|
|
|
|
|
#162 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
|
|
|
|
|
|
|
#163 | |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Quote:
last result computed in 4,328 ms.<- my updated code to 500,000 (which checks evens effectively to 1 Million) last result computed in 49,266 ms.<- your gold(n) code to 1 million second test of my code gave -500 on my first test of it I think. I should test all codes given so far. *** last result computed in 3,812 ms. is my second test with CRGreathouses optimizations Last fiddled with by science_man_88 on 2010-07-24 at 23:53 |
|
|
|
|
|
|
#164 |
|
Aug 2006
135338 Posts |
Please post both scripts so I can compare!
Last fiddled with by CRGreathouse on 2010-07-25 at 00:49 |
|
|
|
|
|
#165 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
last result computed in 47,531 ms. <- second run of gold(n)
note: your earlier codes looked more promising than mine does now |
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Goldbach Conjecture | MattcAnderson | MattcAnderson | 4 | 2021-04-04 19:21 |
| Factorial and Goldbach conjecture. | MisterBitcoin | MisterBitcoin | 17 | 2018-01-29 00:50 |
| Goldbach's weak conjecture | MattcAnderson | MattcAnderson | 19 | 2017-03-21 18:17 |
| Goldbach's conjecture | Citrix | Puzzles | 3 | 2005-09-09 13:58 |