Little explorations with HP calculators (no Prime)
|
04-03-2017, 10:12 PM
Post: #115
|
|||
|
|||
RE: Little explorations with the HP calculators
(04-03-2017 09:59 PM)DavidM Wrote: I know that you are still warming up to the idea of using the stack for temporary data storage within RPL programs, but it's probably one of the only UserRPL ways that you would be able to speed this up. More specifically, I'm referring to exploding the rrResList elements onto the stack before starting the inner loops, using ROLL/ROLLD to update the stack-based team values while in the loops, then ->LIST after the loops are completed before storing the new rrResList. Once again, thanks for the hint. I may do little programs just to collect the stack operations and so to isolate them and make them very small. I'm against the stack operations not because I don't like them. in 2012 and 2013, when I used more the 50g, I used to do a lot fo operations stack only. I was so convinced that was a principle to avoid mostly any variable. I just had to keep track of the stuff created and moved via comments. Then I saw those programs some months ago, and were like korean. The same impression of the linked solution of Gerson (he skillfully makes use of the stack). If the operation are few, then it is mostly no problem, like 4-5 commands one after another that could be isolated. Otherwise they hinder the maintainability for others (or just for myself for the future) and therefore it is not worth it. If I cannot achieve good performances without heavy use of the stack, while using the stack is quite a mental training (it is not that I dislike it), I decide to move the problem on a different platform. It is, how can I say, a code principle for myself. It would be a better solution to try hpgcc instead of a heavily stack based program in userRPL, in terms of man hours at least. Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)