In support of the 33s & 35s
|
01-04-2018, 12:25 PM
(This post was last modified: 01-04-2018 05:32 PM by BartDB.)
Post: #44
|
|||
|
|||
RE: In support of the 33s & 35s
(01-04-2018 08:53 AM)pier4r Wrote:(01-04-2018 07:49 AM)Dieter Wrote: BTW, the real 35s nerd of course replaces the 3 with pi IP which consumes less memory and probably is even faster. ;-)What the..... is it faster to do an operation, "pi IP" rather than putting a constant (3) in a program? Furthermore having pi as a constant, like 3. I can confirm that using "pi IP" uses less memory and is faster. Looking at the decrease of total memory available (because program length LN=xxx is erroneous), a program line with a constant consumes 38 bytes and a program line with a reserved word uses 3 bytes. From https://en.m.wikipedia.org/wiki/HP_35s : "Since complex numbers and vectors of up to three elements can be stored as a single value, each data variable occupies 37 bytes, enough for a type indicator and three floating-point numbers." It seems the same goes for a constant in a program line. (Thus 37 bytes for the constant + 1 for the line itself, from which we could deduce a reserved word = 2 bytes). Test programs created: (again length quoted looks at the decrease of total memory available) Code:
Program with constant 3 executes in about 1m 14s and the "pi IP" in about 1m 04s Thus for this case a 32 byte and 10s saving. EDIT: Note that each program was entered on its own in a cleared calculator in an attempt to get accurate memory use. . |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 19 Guest(s)