The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

RPL long vs. short names
Message #1 Posted by peacecalc on 29 Oct 2012, 3:56 a.m.

Hello hp 50g freaks,

I didn't find an answer to this question: The read-ability of RPL programs is poor (nevertheless it is language with lot of fun (for me)). What is the effect to of the names length on the execution performance? For instance: I like to use the name "DELTAxSP1xSP2XVER" instead of "DS1S2V". Shure I need then more memory (useullay factor 2, but that's not a problem).

I hope there is outside somebody, who can tell me something about it.

Greetings peacecalc.

Edited: 29 Oct 2012, 3:57 a.m.

      
Re: RPL long vs. short names
Message #2 Posted by Tim Wessman on 29 Oct 2012, 10:43 a.m.,
in response to message #1 by peacecalc

It will be slightly slower, but I expect you will in essence be unable to detect any speed differences.

Much more time in the program will be consumed by checking arguments at each command instead.

TW

      
Re: RPL long vs. short names
Message #3 Posted by David Hayden on 29 Oct 2012, 3:14 p.m.,
in response to message #1 by peacecalc

I know you only asked about speed, but I'll point out that the program will be one byte larger for each character in the name, each time you use it. So if a name is 5 characters longer than an alternative, and you use the name 7 times in the program, you'll save 35 bytes by using the shorter name.

Dave

            
Re: RPL long vs. short names
Message #4 Posted by Eric Rechlin on 29 Oct 2012, 4:31 p.m.,
in response to message #3 by David Hayden

But if you compile the program into a library, then they all become XLIBs and take the same amount of space at each reference no matter how long of a name you give them.

Eric

      
Re: RPL long vs. short names
Message #5 Posted by peacecalc on 30 Oct 2012, 5:17 a.m.,
in response to message #1 by peacecalc

Hello Supporting-Team,

thank you all for sharing your knowledge. I will try building a libary so I can use my proggies for unfolding 3 d meshes into plane in a compiled form, where the the length of names irrelevant is.

I hope this is possible without any knowledge of SYS RPL. I try the program that is mentioned in the user guide of the hp 50g: LBMKR (hpcalc.org).

Greetings peacecalc

            
Re: RPL long vs. short names
Message #6 Posted by peacecalc on 30 Oct 2012, 1:25 p.m.,
in response to message #5 by peacecalc

Hello all,

now I have packed my proggies into a lib, but it has nearly the same size like the "unlibed" proggies, did Eric mean something else? I used LBMKR, it just works fine. Although its nearly 13 years old.

Sincerely peacecalc


[ Return to Index | Top of Index ]

Go back to the main exhibit hall