RPL second impressions (HP 28)
|
06-30-2018, 02:16 PM
Post: #30
|
|||
|
|||
RE: RPL second impressions (HP 28)
(06-30-2018 02:14 AM)Thomas Klemm Wrote: Use only the simplest stack-manipulating commands as DUP, SWAP, OVER or ROT. I would amend that slightly by saying that one should avoid stack commands that take a numerical argument (such as PICK and ROLL) whenever possible. They take several times as long to execute as simple stack commands. The newer commands such as PICK3, DUPDUP and NIP are just as fast as the basic ones you listed, and they save time and memory. Local variables are faster than globals in programs but not as fast as stack operations. When I am writing a program or translating one from another language, I tend to use lots of local variables and avoid complex stack gymnastics. This speeds development time and (slightly) increases readability. If the program is one I plan to keep and use often, I will further optimize it by eliminating variables as much as possible and using the stack more. John |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)