Post Reply 
program execution speed as library vs variable HP50G
10-03-2017, 01:50 AM
Post: #5
RE: program execution speed as library vs variable HP50G
(10-02-2017 05:15 PM)DavidM Wrote:  If you're calling subroutines from your library within inner loops of routines, the overhead of loading the subroutine code from a port can also slow things down noticeably (something I'm dealing with right now in the ListExt library).

The way I'm addressing this (so far) is to "pre-fetch" the subroutine code at the beginning of a given library command, store it in a local (which keeps it in TEMP), then run the local version of the subroutine within the loop as needed. This has improved the performance of the affected commands, even when stored in port 0.

The amount of impact depends on how often the subroutines are called, of course.

Just something to consider!

Thanks for the information. There are many sub routines in this library (165) and some of the larger parts of the program have a number of nested loops. The program in question has a structure like shown below.
« 
LOCAL VARS...
«
DO CLLCD DEPTH 'd' STO
IFERR STUFF...
DO -1 TICKS  J T
«
DO 'J' INCR @<-- DavidM From your recommendation years ago to prioritize key presses once a key has been pressed.
IF THEN
STUFF...
DATE TIME TSTR " MEM:" MEM + + N SDISP
STUFF...
END
UNTIL KEY
END
»
UNTIL 0
END
THEN DEPTH d - DROPN
ask user to Exit?
END
UNTIL Exit?
END
»
»
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: program execution speed as library vs variable HP50G - snrowe - 10-03-2017 01:50 AM



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