Why DEG?
|
09-26-2024, 10:19 AM
(This post was last modified: 09-26-2024 10:23 AM by toml_12953.)
Post: #1
|
|||
|
|||
Why DEG?
In the following Nqueens benchmark, why is DEG used after the ISG and DSE statements? There are no trig functions in the program. If they're supposed to be NOPs, why not just use a register increment or decrement? I'm confused.
Code: LBL "NQUEENS" Tom L Cui bono? |
|||
09-26-2024, 11:55 AM
Post: #2
|
|||
|
|||
RE: Why DEG?
Just a guess, but I'd say DEG is being used as a NOP and it executes much faster than any register access or math operation, as it only sets some internal status bit(s).
--Bob Prosperi |
|||
09-26-2024, 11:59 AM
(This post was last modified: 09-26-2024 12:02 PM by Pekis.)
Post: #3
|
|||
|
|||
RE: Why DEG? | |||
09-26-2024, 12:45 PM
Post: #4
|
|||
|
|||
RE: Why DEG?
It is used as a NOP.
I tried changing it to a synthetic NOP to see if it was much faster but it wasn't much different. (09-26-2024 11:55 AM)rprosperi Wrote: Just a guess, but I'd say DEG is being used as a NOP and it executes much faster than any register access or math operation, as it only sets some internal status bit(s). Calculator Clique on YouTube |
|||
09-26-2024, 10:41 PM
Post: #5
|
|||
|
|||
RE: Why DEG?
(09-26-2024 10:19 AM)toml_12953 Wrote: If they're supposed to be NOPs, why not just use a register increment or decrement? What specific instruction(s) are you suggesting for "register increment or decrement"? On most HP RPN calculators, ISG/DSE are the fastest register increment and decrement, and the only ones that don't affect the stack. Having to use a NOP of some sort after, if you don't use the conditional execution of the next line, is a small price to pay. |
|||
09-27-2024, 12:36 AM
Post: #6
|
|||
|
|||
RE: Why DEG?
(09-26-2024 10:41 PM)brouhaha Wrote:(09-26-2024 10:19 AM)toml_12953 Wrote: If they're supposed to be NOPs, why not just use a register increment or decrement? 1 STO+ 00 or 1 STO- 00 Tom L Cui bono? |
|||
09-27-2024, 02:27 AM
Post: #7
|
|||
|
|||
RE: Why DEG?
(09-26-2024 10:19 AM)toml_12953 Wrote: In the following Nqueens benchmark, why is DEG used after the ISG and DSE statements? Using ISG/DSE or ISZ/DSZ is a small optimization, because normally it's faster than 1 STO+/-. As brouhaha stated, DEG (NOP) is necessary to suppress a skip. Calculator Benchmark |
|||
09-27-2024, 05:08 AM
Post: #8
|
|||
|
|||
RE: Why DEG? | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)