Post Reply 
Little explorations with HP calculators (no Prime)
03-31-2017, 03:12 PM
Post: #89
RE: Little explorations with the HP calculators
(03-31-2017 10:01 AM)pier4r Wrote:  I need help. Can someone run the program that I posted in the post #74 of this thread on an hp 50g/49g with the variable "maxTournRepV" set to 1 (or 2) instead of 1000?

I changed the relevant part of your code as requested:


...then I added one more program to your directory at the top:

    'main' TEVAL

Executing 'timeit' on my 50g generated the following results:

{ 8. 6. 9. 10. 10. 10. 12. 13. 18. 19. 18. 22. 19. 22. 22. 22. }
{ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 4. 0. 0. 0. 0. }
:s: 1163.2958

So it appears that one iteration of rrFunc took about 19.4 minutes.

Extrapolating to 1000 iterations, it would appear that your program would require almost 2 weeks to complete.

I haven't tried to analyze your code, but it's likely that there are some loops which are slowing you down. SEQ appears quite a few times, and I'd take a look at those for a start. While they are nice syntactically, they can be slow -- especially if you are giving them an algebraic to execute. I think I saw at least one of them being used to simply load the stack with a series of placeholders. NDUPN would be much simpler (and faster) to use for something like that. Also consider passing an RPL program object instead of algebraics, as the algebraics have to be translated to RPL sequences anyway behind the scenes.

GET and PUT can also be slow if called repeatedly (I saw them, but didn't trace the code to see how often they are called).

The WHILE-REPEAT loop is also something I'd look at closely. What's the likelihood of it needing a significant number of iterations?

Again, I haven't traced through your code to see what it's actually doing. These are just my "gut check" ideas after a quick scan.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Little explorations with the HP calculators - DavidM - 03-31-2017 03:12 PM

User(s) browsing this thread: 1 Guest(s)