Post Reply 
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. ;-)

Dieter
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.

Now I am interested. Why?

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:

A001 LBL A
A002 1000.000
A003 STO Z
A004 CLx
A005 3
A006 +
A007 DSE Z
A008 GTO A005
A009 RTN

Length = 97 bytes


A001 LBL A
A002 1000.000
A003 STO Z
A004 CLx
A005 pi
A006 IP
A007 +
A008 DSE Z
A009 GTO A005
A010 RTN

Length = 65 bytes


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.

.


Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: In support of the 33s & 35s - cjmcc - 12-31-2017, 10:36 PM
RE: In support of the 33s & 35s - TheKaneB - 01-01-2018, 12:08 AM
RE: In support of the 33s & 35s - Joe Horn - 01-01-2018, 02:03 PM
RE: In support of the 33s & 35s - pier4r - 01-01-2018, 03:28 PM
RE: In support of the 33s & 35s - pier4r - 01-01-2018, 08:38 PM
RE: In support of the 33s & 35s - pier4r - 01-01-2018, 03:45 PM
RE: In support of the 33s & 35s - Gerald H - 01-01-2018, 05:41 PM
RE: In support of the 33s & 35s - pier4r - 01-01-2018, 04:31 PM
RE: In support of the 33s & 35s - pier4r - 01-02-2018, 10:25 AM
RE: In support of the 33s & 35s - grsbanks - 01-02-2018, 03:10 PM
RE: In support of the 33s & 35s - grsbanks - 01-02-2018, 06:42 PM
RE: In support of the 33s & 35s - Dieter - 01-03-2018, 07:05 PM
RE: In support of the 33s & 35s - pier4r - 01-02-2018, 06:53 PM
RE: In support of the 33s & 35s - pier4r - 01-03-2018, 08:19 PM
RE: In support of the 33s & 35s - Dieter - 01-03-2018, 09:11 PM
RE: In support of the 33s & 35s - Dieter - 01-03-2018, 09:43 PM
RE: In support of the 33s & 35s - pier4r - 01-03-2018, 10:13 PM
RE: In support of the 33s & 35s - TheKaneB - 01-03-2018, 10:25 PM
RE: In support of the 33s & 35s - Trond - 01-03-2018, 10:47 PM
RE: In support of the 33s & 35s - TheKaneB - 01-03-2018, 11:15 PM
RE: In support of the 33s & 35s - Dieter - 01-04-2018, 07:49 AM
RE: In support of the 33s & 35s - TheKaneB - 01-03-2018, 11:53 PM
RE: In support of the 33s & 35s - Dieter - 01-04-2018, 08:06 AM
RE: In support of the 33s & 35s - grsbanks - 01-04-2018, 08:38 AM
RE: In support of the 33s & 35s - TheKaneB - 01-04-2018, 10:00 AM
RE: In support of the 33s & 35s - pier4r - 01-04-2018, 08:53 AM
RE: In support of the 33s & 35s - BartDB - 01-04-2018 12:25 PM
RE: In support of the 33s & 35s - pier4r - 01-04-2018, 01:21 PM
RE: In support of the 33s & 35s - Dieter - 01-04-2018, 07:00 PM
RE: In support of the 33s & 35s - BartDB - 01-04-2018, 07:31 PM
RE: In support of the 33s & 35s - Dieter - 01-04-2018, 08:33 PM
RE: In support of the 33s & 35s - TheKaneB - 01-04-2018, 02:34 PM



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