[HP35s] Program for prime number (Wheel Sieve and Miller-Rabin)
|
02-14-2019, 09:17 PM
Post: #18
|
|||
|
|||
RE: [HP35s] Program for prime number (brut force)
(02-14-2019 07:51 PM)fred_76 Wrote: You are right, this would simplify the code. But unfortunately, at least on the HP35s, the instruction x=0? (about 3 ms) is 4x faster than STO*Var (about 12 ms). Thus you will end-up with a run time increased by a factor of about 4. It also depends on how many steps are executed within the loop. Right now it's 49 vs. 53, so we gain a few steps using Albert's suggestion. You can also try numbered registers instead of variables. I could imagine that they are faster. But I could be completely wrong. Best regards Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 12 Guest(s)